Timeline for Breaking out of nested for loops in Java
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 12, 2012 at 16:55 | vote | accept | Froskoy | ||
| Dec 12, 2012 at 16:43 | comment | added | Darius | @PeterLawrey makes a good point, follow the kind of naming convention used for CONSTANTS | |
| Dec 12, 2012 at 16:42 | comment | added | Peter Lawrey | @Froskoy You can break out of any block of code, it doesn't have to be a loop. | |
| Dec 12, 2012 at 16:41 | comment | added | Peter Lawrey | +1 labels are usually in UPPER_CASE. I assume you want continue outer; Break will exit that loop as well. | |
| Dec 12, 2012 at 16:41 | comment | added | Froskoy | Thanks! I wasn't aware you could use labels with different types of loops. That's really helpful. | |
| Dec 12, 2012 at 16:39 | history | answered | Darius | CC BY-SA 3.0 |