SyntaxFix
Write A Post
Hire A Developer
Questions
In this case, I'd recommend using break labels.
http://www.java-examples.com/break-statement
This way you can specifically call it outside of the for loop.