int n = 5;
if (n > 0)
if (n > 10)
System.out.println("big");
else
System.out.println("small");What is printed?
- A
big
- Bcheck_circle
small
- C
big small
- D
nothing
Explanation
The else binds to the nearest unmatched if (n > 10). Since n = 5, n > 0 is true (enter), n > 10 is false (else), so "small" prints.