JAVA · ОСНОВЫ · LESSON 09
Two checks.
Знаки && и || · about 15 minutes
Learning with progressRead the summary for free. To save the work, log in to the account.
Type the code yourself
Type an example manually. Check the signs and brackets.
public class Main {
public static void main(String[] args) {
int age = 9;
boolean canJoin = age >= 7 && age <= 12;
System.out.println(canJoin);
}
}Open the editor for class workSolve it yourself
Create int points = 8. Save boolean passed check: points is not less than 5 and not more than 10. Take out passed.
The answer is hidden. Use similar examples from the lesson notes.
Opening up your homework