| Real'sHowTo |
|
|
Custom Search
|
| Real'sHowTo |
|
|
Custom Search
|
class JavaGoto {
public static void main(String args[]) {
int max = 10;
int limit = 5;
int j = 0;
out: { for( int row=0; row< max; row++ ) {
for( int col=0; col< max; col++ )
if( row == limit) break out;
j += 1;
}
}
System.out.println(j); // output 5
}
}
Written and compiled by Réal Gagnon ©1998-2013
[ home ]