public static int sc() {
int x = 5;
int y = 10;
if (x > 3 || ++y > 20) {
x++;
}
return x + y;
}
// Call: System.out.println(sc());What is printed?
- Acheck_circle
16
- B
26
- C
15
- D
17
Explanation
x>3 is true so ++y is short-circuited (y stays 10). x++ makes x=6. Return 6 + 10 = 16.