Search:

Type: Posts; User: GregBrannon

Search: Search took 0.07 seconds.

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

    How is the switch statement more efficient than if/else?

    It sounds like the result is one greater than you'd like, so check your logic. Can strengthCount ever be zero?
  2. Re: How to turn my If statement into a case/switch statement?

    You try it and come back to ask for help with whatever problems you're having. I've shown you all but for ~3 lines of code.
  3. Re: How to turn my If statement into a case/switch statement?

    You could define an array of strength strings, like:


    String[] strengthString = { "No password; da fuq hacks",
    "Very Weak",
    ...
  4. Re: How to turn my If statement into a case/switch statement?

    I'm not sure I agree with your premise in general, but I definitely can see from your code that not all 'if' statements can be converted to more efficient switch statements. If you can suggest how...
Results 1 to 4 of 4