How do exit two nested loops? [duplicate]
问题 This question already has answers here : How do I break out of nested loops in Java? (35 answers) Closed 3 years ago . I have been using Java for quite some time, yet my education in loops is somewhat lacking. I know how to create every loop that exists in java and break out of the loops as well. However, I've recently thought about this: Say I have two nested loops. Could I break out of both loops using just one break statement? Here is what I have so far. int points = 0; int goal = 100;