Learn Java 5: Conditions Part 2

Learn Java 5: Conditions Part 2

Firstly, you could use nested if statements. The word nested means that there is one inside of the other, so evidently nested if statements are if statements inside of each other. This ensures that, if the first condition is true, Java moves inside of the if statement to execute the code.