← Back to Question List
Java Quiz #3
Loop Output
What is the output of this code?
📄 Code
1public class Main {2 public static void main(String[] args) {3 for (int i = 0; i < 5; i++) {4 if (i == 3) {5 break;6 }7 System.out.print(i + " ");8 }9 }10}