Search:

Type: Posts; User: blobby404

Search: Search took 0.10 seconds.

  1. Re: How to turn my If statement into a case/switch statement?

    Thank you. Thank you to you and everyone else who gave advice.
  2. Re: How to turn my If statement into a case/switch statement?

    Iv found the error. I had repeated some strings in the switch statement multiple times. So actually output was correct, i had just repeated some strings by accident.

    OLD VERSION OF CODE:




    ...
  3. Re: How to turn my If statement into a case/switch statement?

    No, because the output that the switch statment has been producing has been incorrect, whereas the IF statements was producing the correct results, which is why i cant figure out why it is not working
  4. Re: How to turn my If statement into a case/switch statement?

    1 Shaun Password1! memorable1
    2 Andrew Password2 memorable2
    3 Danny Password memorable3
    4 Zac password memorable4
    5 Lauren pass memorable5
    6 Jake memorable6
    7 Andy p7 memorable7
    8 Chris...
  5. Re: How to turn my If statement into a case/switch statement?

    I can actually check the output perfectly fine, i have a Binary Tree which allows me to search users and test this. I know which passwords equal what strengths! Although i am only showing this method...
  6. Re: How to turn my If statement into a case/switch statement?

    Well according to the lessons that i have taken it is better to code with less lines. Iv already done this and they are not, i think it is a syntax error but i am unsure as i am unfamiliar with Java....
  7. Re: How to turn my If statement into a case/switch statement?

    Because it uses less lines of code. And yes it can be zero, if no password exists then it is indeed zero. When a password which is an empty string is checked then the program still returns "no...
  8. IF statement TO Case statement issue

    I have created an algorithm which checks a password for its strength. The program does this by checking for length of string, and types of charecters used.

    I have created this method using mainly...
  9. Re: How to turn my If statement into a case/switch statement?

    Iv attempted this, and whilst it works to some degree; It is detecting Very strong passwords as strong, and strong passwords as meduim, etc. Help me please! Haha xD

    Below is my case statement...
  10. Re: How to turn my If statement into a case/switch statement?

    Would it be possible to show me the full code of how to do this? I'm not too sure of how to code this properly - even with the example you have given. I would be very grateful!
  11. Re: How to turn my If statement into a case/switch statement?

    Ahhhh, being fairly new to programming i assumed that i could make this code more efficient. So is there no way this code can be made more efficient?

    Kind Regards, Shaun
  12. How to turn my If statement into a case/switch statement?

    So from what iv learnt in Java and programming in general is that using a case statement is far more efficient that using multiple IF statements. I have an multiple IF statements contained within a...
  13. Replies
    2
    Views
    838

    Help with ArrayList Features

    Iv created an array list which contains people and attributes such as user id, username etc. It works fine for the most part. It allows the user to enter a name into the system. If the name entered...
  14. Re: How to make a very simple Password Strength indicator?

    Yes:)
  15. Re: How to make a very simple Password Strength indicator?

    Thank you, iv adapted my code accordingly but receive a new error.




    if (strengthCount==1) {
    strengthCount=Weak;
    }
  16. Re: How to make a very simple Password Strength indicator?

    if (strengthCount=1) {
    strengthCount=Weak;
    }



    This is where the error begins.

    Error: incompatible types: int cannot be converted to boolean.
  17. Re: How to make a very simple Password Strength indicator?

    Done.

    I am getting an error: incompatible types: int cannot be converted to boolean.

    I understand data types and understand the conflict within the code but do not understand how i can resolve...
  18. Re: How to make a very simple Password Strength indicator?

    Heres my code so far. It says cannot convert int to boolean though? I understand data types and why there is conflict within my code but do not understand how to resolve this, can you help?

    I am...
  19. Re: How to make a very simple Password Strength indicator?

    Well, simple as in;

    I start with a count that is = 1 (Very low strength password)

    Other password strength levels are:

    2= low strength password
    3= medium strength password
    4= high strength...
  20. How to make a very simple Password Strength indicator?

    Hi there! I am developing a number of Data Structures in Bluej. Iv created a nice little arraylist program, and want to add a password generator to this program. People are already prestored within...
  21. Having Trouble Linking a method from another class!

    Please read all of this before commenting! Thank you!

    Im fairly new to Java, i use the BlueJ software to develop my programs.

    I am creating a program which holds two data structures; Array...
Results 1 to 21 of 22