// BreakExample.java – Demonstrates the use of break statement
class BreakExample {
public static void main(String[] args) {
loop1: for (int i = 0; i < 3; i++) {
loop2: for (int j = 0; j < 3; j++) {
System.out.println("i=" + i + " j=" +j);
if (j == 1)
break loop1;
}
}
}
}