<code>int i = 0; while (++i < 3) System.out.print(i + " ");</code>
- A
0 1 2
- B
1 2 3
- C
0 1
- Dcheck_circle
1 2
Explanation
Pre-increment first: i=1, condition 1<3 true, prints 1; i=2 prints 2; i=3 condition false, stop.
AP Computer Science A· difficulty 4/5
<code>int i = 0; while (++i < 3) System.out.print(i + " ");</code>
0 1 2
1 2 3
0 1
1 2
Explanation
Pre-increment first: i=1, condition 1<3 true, prints 1; i=2 prints 2; i=3 condition false, stop.
Want 10 more like this — adaptive to your weak spots?