Search:

Type: Posts; User: jps

Search: Search took 0.11 seconds.

  1. Re: Random Boolean in an if statement (tricky, can't seem to figure out)

    Ok I see what you are doing with the if now.
    The same thing applies to the return statement. When the method returns, that is the exit door. All code must be before the return statement
  2. Re: Random Boolean in an if statement (tricky, can't seem to figure out)

    Unreachable statement.
    Now think about the line of code we discussed, the one that returns a value. How can that if else ever be reached if you return a boolean one line earlier?


    Think about...
  3. Re: Random Boolean in an if statement (tricky, can't seem to figure out)

    What did that massive error say?
    Always post the full text of your error message with the code and question.
    What does this line do?
    return rnd.nextBoolean();
Results 1 to 3 of 3