Saturday, June 23, 2018

How to terminate in multiple loop in Java?

Does the keyword 'break' only jump out of one layer of loop? In this piece of code, there are 3 layers loops, which I want to jump out completely. Is there an easy to do that?



while(){

while(){

for(){
if(a==b){
// I want to jump out of the outer while() loop.
}

}
}
}
// and the logic continues from this line.

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...