Kotlin Programming related knowledge points : Kotlin programming using IntelliJ IED and understanding Source files (. kt) Kotlin programming and other properties Kotlin programming methods such as using Kotlin programming Kotlin programming of the
JAVA label and continue, break, java label continueYou can add labels to statement blocks to give them names. The labels are located before the statements. The label can only be referenced by continue and break. The format is as follows:Label:
Cocos2d3.0RC2 official offers us a lot of examples, here we learn Label, character bag official project is there, I also passed a copy here: http://download.csdn.net/detail/qqmcy/7245621
LabelAtlasTest
bool HelloWorld::init(){ //////////////////
5.3.1 Use the break statement
In Java, the break statement has three functions. First, you can see that in the switch statement, it is used to terminate a statement sequence. Second, it can be used to exit a loop. Third, it can be used as an
Break means to jump directly out of the current loop, and break can only be applied to switch--case statements and loopsContinue means jumping out of the loop and continuing with the next loopThe label tag can choose to break, or continue for which
The syntax of a break has two kinds of break; and break label; let's introduce you to break the whole loop nested exampleToday, when reading the JavaScript Authority Guide, we found that there are two kinds of break syntax (break; and break label;
The Difference and function of break, continue, and label.
The differences and functions of break and continue:Break is used to completely end a loop [generally only exit a loop], and the statement after the loop is executed by the exclusive loop
Original: break[label]continue[tag] usage in JavaNote: Tags in Java must precede loops and cannot have other statements in the middle. For example: Tag:for or while or do--while;1. Use break to exit a layer of loops (as with the break usage in C + +)
in programming, we often use break to jump out of loops, as follows:
The screenshot shows that when I==1 && J==1, the inner for loop is jumped out.
But what if we want to jump out of the outer loop, we can do that by adding a label to the front
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.