Multiple Choice
if (number >= 15) { System.out.println("Sorry, number is too large"); }boolean x = false; boolean y = true; int z = 13; if (z > 10 || (x != true && y == false)) { System.out.println("Sorry, access denied"); } else { System.out.println("Nice one, access granted"); }int a = 15; if (true || (a > 100)) { a = a + 2; } System.out.println("a = " + a);boolean A = true; boolean B = false; boolean C = true; boolean D = (A && B ) || C; boolean E = (!D) || (!A);System.out.print("All even numbers between 0 and 100: "); for (int i = 0; i < 100; i++) { if (<condition_here>) { System.out.print(i + " "); } }
Last updated