I've got a nested loop construct like this:
for (Type type : types) {
for (Type t : types2) {
if (some condition) {
// Do something and break...
break; // Breaks out of the inner loop
}
}
}
Presently how might I break out of the two loops? I've looked at comparable inquiries, yet none concerns Java explicitly. I was unable to apply these arrangements in light of the fact that most utilized
gotos
I would prefer not to place the inward loop in an alternate technique.
I would prefer not to rerun the loops. When breaking I'm done with the execution of the loop block.