Timeline for How do I break out of nested loops in Java?
Current License: CC BY-SA 4.0
17 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 15 at 6:34 | comment | added | Jon Skeet | @ImtiazU: The objection is mostly about readability - how easy it is to understand the code. It's not a matter of efficiency. | |
| Oct 15 at 2:49 | comment | added | Imtiaz U | This seems like a clean way to do this, but I wonder why people are averse to this solution or "goto" in general? Is there anything computationally inefficient about this? | |
| Sep 12, 2022 at 1:22 | comment | added | Graeme Gill | Breaking it up into different methods is only a win if the state is small, or is kept in a form that can be passed by reference. If the state the loops is referring to/manipulating is larger, then an elegant way of breaking out of/continuing the loops becomes a necessity. | |
| Dec 5, 2018 at 7:27 | history | edited | Jon Skeet | CC BY-SA 4.0 | added 60 characters in body |
| Dec 5, 2018 at 0:12 | review | Suggested edits | |||
| Dec 5, 2018 at 2:10 | |||||
| Apr 20, 2018 at 17:11 | history | edited | Jon Skeet | CC BY-SA 3.0 | deleted 6 characters in body |
| Apr 20, 2018 at 17:11 | history | rollback | Jon Skeet | Rollback to Revision 4 | |
| Apr 20, 2018 at 17:10 | history | rollback | Jon Skeet | Rollback to Revision 3 | |
| Apr 20, 2018 at 16:26 | history | edited | Georg Plaz | CC BY-SA 3.0 | https://meta.stackexchange.com/questions/127639/when-is-edit-update-appropriate-in-a-post |
| Nov 11, 2017 at 14:39 | review | Suggested edits | |||
| Nov 11, 2017 at 14:49 | |||||
| Mar 19, 2016 at 14:15 | review | Suggested edits | |||
| Mar 19, 2016 at 14:17 | |||||
| Aug 20, 2015 at 6:41 | review | Suggested edits | |||
| Aug 20, 2015 at 7:19 | |||||
| Oct 25, 2012 at 9:46 | history | edited | Jon Skeet | CC BY-SA 3.0 | added 174 characters in body |
| May 20, 2009 at 9:17 | vote | accept | boutta | ||
| May 20, 2009 at 9:16 | history | edited | Jon Skeet | CC BY-SA 2.5 | added 108 characters in body |
| May 20, 2009 at 9:15 | comment | added | Jon Skeet | This does jump to directly after the loop. Try it! Yes, the label comes before the loop, but that's because it's labeling the loop, rather than the place you want to exit to. (You can continue with a label too.) | |
| May 20, 2009 at 9:11 | history | answered | Jon Skeet | CC BY-SA 2.5 |