Conditionals
Computer Science · Java
Loading practice question…
About this practice set
Conditionals is part of Computer Science (Java). Questions are generated with new numbers each time you practise. Levels available: Easy. After you answer, an explanation is shown.
Example questions
A taste of what you will practise. Answers are revealed after you try.
Easy
What does this Java code print? int n = 6; if (n > 5) { System.out.println(1); } else { System.out.println(2); }