What is the output of the following Java code?
for (int i = 0; i < 5; i++) { if (i == 2) break; System.out.print(i + " "); }
0 1 2 3 4
0 1
0 1 2
No Output
This question is part of this quiz :
Java Control Statements and Loops