Skip to content
Quiz · Loops · lesson 8 of 8

Quiz — a labeled break

What does the program print?

JAVA
public class Main {
    public static void main(String[] args) {
        outer: for (int i = 1; i <= 3; i++) {
            for (int j = 1; j <= 3; j++) {
                if (i * j == 4) {
                    break outer;
                }
                System.out.print(i * j);
            }
        }
    }
}