demonstration of multi breaks in java with flags
public class breakFlag {
public static void main(String[] args) {
boolean done = false;
int i=0;
while (done == false && i<5){
int j = 0;
while (j<5){
System.out.println(i+";"+j);
j++;
if(i+j>5) done = true;
}
if (done) break; // can skip the "================"
System.out.println("===================");
i++;
}
}
}