Create a new class with name ControlContinue:
Output:(Click on the image to enlarge)
class ControlContinue {
public static void main(String args[]) {
//boolean bool = true;
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 10; j++) {
System.out.print(j + "\t");
if (j > 5) {
System.out.println();
continue;
}
}
System.out.println("Outer Loop");
}
System.out.println("End");
}
}
public static void main(String args[]) {
//boolean bool = true;
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 10; j++) {
System.out.print(j + "\t");
if (j > 5) {
System.out.println();
continue;
}
}
System.out.println("Outer Loop");
}
System.out.println("End");
}
}
Output:(Click on the image to enlarge)