What will be the output of the following loop?

Last Updated :
Discuss
Comments

What will be the output of the following loop?

Java
for (int i = 0; i < 3; i++) {     System.out.print(i + " "); } 

0 1 2


1 2 3

0 1 2 3

Infinite Loop


Share your thoughts in the comments