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
Type: Posts; User: jps
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
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...
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();