for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++) {
if((style & key) != 0){
c=i;r=j;
break outside:
}
}
}
outside:
为什么不行呢?
------解决方案--------------------
在仔细学习一下labelled break是怎么回事吧。
1,outside: for(...)
2, break outside;
break跟go to,或者jump to可不一样哦。
------解决方案--------------------
boolean is True = true;
outer:
for(int i=0; i <5; i++) {
while (isTrue) {
System.out.println( "Hello ");
break outer;
} // end of inner while loop
System.out.println( "Outer loop. "); // Won 't print
} // end of outer for loop
System.out.println( "Good-Bye ");