public class LoopTest { public static void main(String args[]) { int a = 5; outside: for (int i = 1; i < 3; i++) { inside: for (int j = 1; j < 3; j++) { System.out.print(j); if (a++ > 6) continue inside; break outside; } } } }
public static void main(String args[]) {
int a = 5;
outside: for (int i = 1; i < 3; i++) {
inside: for (int j = 1; j < 3; j++) {
System.out.print(j);
if (a++ > 6)
continue inside;
break outside;
}
Oracle Certified Professional Java Programmer
Access: Public Instant Grading
Jobilize.com uses cookies to ensure that you get the best experience. By continuing to use Jobilize.com web-site, you agree to the Terms of Use.