int x = 10;
do {
System.out.println(x);
x++;
} while (x < 5);What is printed?
- A
nothing
- B
5
- C
10 11 12 13 14
- Dcheck_circle
10
Explanation
do-while runs the body at least once before checking the condition. It prints 10, increments x to 11, then checks 11 < 5 which is false, so the loop exits.