Decrementing For Loop
What is printed when the following code segment is executed?
public class ReverseFor {
public static void main(String[] args) {
for (int i = 3; i >= 1; i--) {
System.out.print(i);
}
}
}
A
321
B
3 2 1
C
123
D
Compilation Error
Question Leaderboard
Not enough data yet to show leaderboard.
APFIVE