I have a construct where I have a for loop nested inside of a while loop in Java. Is there a way to call a break statement such that it exits both the for loop and the while loop?
I have a construct where I have a for loop nested inside of a
Share
You can use a ‘labeled’ break for this.
}
Taken from: http://download.oracle.com/javase/tutorial/java/nutsandbolts/branch.html