Jumps to the specified loop

Source: Internet
Author: User
public static void Main (string[] args) {
//TODO auto-generated method stub\
loop:for (int i = 0; i < i++) {//The loop is set here as the specified jump point for
(int j = 0; J < 5; J + +) {
System.out.println ("second Loop");
for (int j2 = 0; J2 < 3; j2++) {
System.out.println ("Go up here and jump to the outermost layer, then proceed down");
Break loop;
}
}} System.out.println ("Follow the procedure, after the innermost loop, the execution side jumps out of the three-layer loop, here");
}
Set a label so that the break to the specified place, you can jump out of the multi-layer loop

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.