Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
The goto statement can jump to any point in the program, while the break statement is your_label; can be used to quickly exit two or more cycles. It is because of this that you can use a label with a break statement in cycles, and not everywhere, unlike goto. As far as I know, using a label is not a good practice in Java, and most likely the code can be refactored so that you don't have a bunch of nested loops.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question