本文关键词:

java continue break 关键字 详解 区别  用法 标记  标签 使用 示例 联系   跳出循环 带标签的continue和break 嵌套循环  深入continue break 跳出双层循环 goto替代

continue和break都用来中断循环,但是中断内容不同

break是跳出循环, continue是跳出当次循环

                for (int i = 0; i < 6; i++) {

                        System.out.println(i);
if (3 == i) {
break;
}
} System.out.println("++++++++++++++++"); for (int i = 0; i < 6; i++) { System.out.println(i);
if (3 == i) {
continue;
}
}

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJkAAADICAIAAAB07NS/AAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAA/+AAAP/gGy1pUqAAAFvElEQVR4nO3doY7bSBzH8fHpyKHiI4figtU+gfME65Ki0GUJjEnZwrAjNlyzpUEhGz9B/ASrgNqkpHhLSn3ASdq7W2Umm8r7z0/fjwqqSCuN9JXtxOMZR1++fnd7f/35x7dv3xwu0+8vfrparQYeB84XvXhcvnv37u2GhFf67a0HgF+GljpoqYOWOvwtq1m0My7aAUaE1/K0rGZR+pQ3Xdd1Te6yeFYNMyy8wvGW1apM8of5yDnnRvOHPCkXHJtmHW1ZrUp3/X7knHOuLcZxVrt62wwyLpzOd71MruK2GEdRFC8nTZMngwwKr+JrWWdxvJw0Xddt+lMtzHr5fuxOfJU4d73eV2wfl3UyiQcZF07nuR+7+x67mY/6/7t1d3/zNiOFj+cce3Pf5C6LoyiKCGkd8yQ6uIeng5Y6aKmDljpoqYOWOmipI6Rlf3OdqUvrfC2rWRTdusl0kMHgLMdbtsXCrbvN/P1Ao8E5js6TuNF8cz/QQHA2vvvooKUOWuqgpQ7/87FRFEVp6VyZRvzKNI25aB2cY3XQUgctddBSBy110FIHLXV4W7Is+mJ47/ukbt3tl0XfUtMy73qS/RKS0YdJUi8fiWlX+PWy2daHRdKw6PhzBT9Us7RM8oZlXoYFtWyLcVomecPKaNP859i2GMeZ262nhWH+ZyoJeSk8+/vM0tK5ercwmrlo25iL1sE9PB201EFLHbTUQUsdtNRBSx1hz60zF30J/PO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OWOvwtf+w4ytXSNk/L0Xzzr41EyGnYieui6y3PipgVvI9Ivy56umYq2izWRetgLloHv0l00FIHLXXQUgctddBSBy110FIHLXXQUgctddBSBy11/APsumGea/iwyAAAAABJRU5ErkJggg==" alt="" />

从结果也可以看得出来:break跳出当前循环,continue跳出当次循环


详细说明:

break在循环块中的作用是跳出当前正在循环的循环体

continue用于结束循环体中当次循环其后语句的执行,并跳回循环程序块的开头执行下一次循环

如果是多层循环,原理仍旧相通,break跳出内层正在循环的循环体,continue跳回内层循环的开头

也就是说多层循环下,break和continue仍旧是控制当前循环,并不是所有

                 for (int i = 0; i < 6; i++) {

                        for (int j = 0; j < 6; j++) {
if (2 == j) {
break;
}
System.out.print(i + "----->" + j+" ");
}
System.out.println();
}

内层循环直接跳出中断掉,外层循环依旧按顺序执行

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAALgAAABuCAIAAAAbNk6iAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAA/+AAAP/gGy1pUqAAAFbElEQVR4nO2dsW7bSBCGhwHyJmKKQLgHoJ9ATJPKrTuyFJt0Lt2loUqpc5sqRUA+gVT5igCCi6MaN8YB17vlFaKoFa2VJ+GSO4P8X2cR4A5+/eRS3N+zwdPzCxH99/z497/viSj59BcB8Ip3vgsAOoBRAAsYBbCAUQCLS0Yp06DharEbraJfx1edWvQh2i2ugiBIyx6nsBqlTIN4m1d1XddVTlnYaxQXlOnZ78NXnVr0oTINghu6Tvqe/+n55en55eHhYfnj5/LHz7qhSCjay7CXIjL/9ESREFFSdD/zUqcWfao8SormWOfQr2G5o5TfVzT9MCEiot3iKsw2tHms+pqyJ7NlXeXb2LxwfNWpRR+azNfLmYuT259Roo/hfmoLv11XVR65GK03k/m6LqZZaMy3vurUoo8j7EbZZGH47bqq63o9nxif79VpMOoZ+vOW8GNEtLo7XDa2OodGiz6uOP+MUuWROafJmIObQroPBz7q1KJPS+9nFNvDbF0kxxF7j+KGcw9r3urUoo9xbBijNO7cI0CF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SkB3N8RJcUqTP4MEl88W0hy1OOsgLLqnQZ8yOSzKQF1yShbfgkjxkBZfk4W2ruE2z1iZoBpYTXCIt+jjCapTJfH1co55mYauFtGCOp45LavRxBbfjkohcjpTgUhex+rSMEVzqfhveEBpckq2PcWwQo6jpKISOSw3ouAQkoOnnMfAIjAJYwCiAxXmjBEEwch1AOLijABYwCmABowAWMApgAaMAFjAKYPE/k1zxG1X7nWMAAAAASUVORK5CYII=" alt="" />

                 for (int i = 0; i < 6; i++) {

                        for (int j = 0; j < 6; j++) {
if (2 == j) {
continue;
}
System.out.print(i + "----->" + j+" ");
}
System.out.println();
}
外层循环依旧,内层循环仅仅跳过了j=2的值,其他的值依旧正常循环

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeUAAABmCAIAAAB6AR73AAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAA/+AAAP/gGy1pUqAAAKTUlEQVR4nO2doXLbaBSFr5ctKl6yKCro5AnUJ7BRUGiZDS1SFhhWIsOYhQYVyU8QP0EmYGVSUpyS0n+BZFmS/dvxbnTvPZPzoR3bMznzrXwly/U9ox8/f4vI33/9+evXLxH58OGDEEII8ccf1gEIIYS8Cs5rQgjBgPOaEEIw4LwmhBAMjs3r1WxU83mxUUt0PlY5UfyIbBafR6PRbKX7VyH87EKqx4TwU1MdQXx/7VGJUTuEovN6NRtNnvIyhBDKXLJE+81+KNAhGVY5UfzIajYafZHrqX4cCD/ju7CluFSMieJHREQ2iy/Z5VT1EALyk1YxQwghPM4vho3x4+fvHz9/hxBeXl5eXl6aY3fajlHmaSeVDcVURKZF/zGTnCh+yjydFvVzvaeGzgLhp/8CrZRIfup0inaA/JR5qpksMq/bb+8yT0VOHOlalHnaOZ9Z5UTx06A8r+H81M9pZQTy08xKzXmN40d5XsfvX6efkureTPJwXW6dWXMxfwzFZZa07sVa5UTxYwWOn/o+aZJJ/nWsFgXEz+pbJvn90J/yDwDiR0TWWaJ2nz0+r9dZkjxcl6F/T6Zzg70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UiIhfzx9A7zaWfkuoeUvJwXXbWrwwKjB8jgPzUt7CTTPKvauc2FD9WOVH8iMg6S9S+AInM69Vs8hSx1bnB3oo99OMNyadUZHfbY50lycN1qXDvqAWQHxOg/DS3sG+etU50KH6O5BwUFD/VBG9/ATL0yD64T9XLnvI9nPQVwPhp0N1/jeenQmtlKIofq5wofvq46CtwU+7gtK/At5/Wc0YHPISfEMz24qP4efflOx6OH5zfy6xmk6e8DP1vz8Z3ZS71DaSJFHvPvxsifuqbs5OlyHIS+4j3Hjjsp/3pN3m43vf3bogcP6TGx/HDvgJCCMEA5/qaEELeN5zXhBCCAec1IYRgwHlNCCEYcF4TQggGnNeEEIIB5zUhhGAQndfKe7j/DyZ9BUB+TPoKUPxY9RWg+KlR7w1A8eOor0BzD/dp/PUVQPgx7CuA8GPYVwDhR0SsegNQ/HjpK/CFv74CX/jrK/CFv74CX/jrK/CF974Cf/jqK/CHr74Cf/jqK/CHr74Cf7juKxDdPdyvxE9fgaD4sQPFj0lfgYD4MewNgPAjyjlP71Pt7iwNnZHY2h449OO9F1R56kW5nXAmGzGd+ulENFsgDOCnyWkhya+f9i5Tu72mfv0cyTkMr5rXtu/2Nk76Cvq49dNgm9C/nwrDFc8u/XjpDfDqp4+LvgKrPe57OO0r8O2n9ZxVRAQ/IdjlBPFjdn0N4kclZ2xedz4VuKh3iB4urah6/1Nh/OxdIuk4QvFjlRPFzzkveEtQ/GjnZF8BIYRggPTv+Qgh5D3DeU0IIRj8C9B9SjeK0tzjAAAAAElFTkSuQmCC" alt="" />


如果带标签,那么break 和continue生效的循环就不再是当前了,而是标签指定的

                label:
for (int i = 0; i < 6; i++) { for (int j = 0; j < 6; j++) {
if (2 == j) {
break label;
}
System.out.print(i + "----->" + j+" ");
}
System.out.println();
}
直接break 标签的循环,执行了两次就再也没有输出了

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAALgAAAAlCAIAAAB+qbQNAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAA/+AAAP/gGy1pUqAAACDElEQVR4nO3asU7CQBgH8O+MxhehDoQ4OZUnAJ2ZTNjawQEewcEHKCPMTkwOpH0BYaoxJMTleAAH3+EcWqEprfmgV69n/r9J2oT75/OPdyWKOI7fPi8I/oPX57sHelzf3zCvH0GgKMBxvvvp8uvdYA5ouH1RhsOhwRzQcGemAzSUEMJ0hGZBUYAFRQEWFAVYiosS+SLVnWz/ONExTOW0ZT5E20lXCOFHld+ooCiRL/qbQCqllAxo7GhYpZrIL/x9mMppy3wo8oUY0sDTs0ocx9PFerpYq1TokZuMIRmFm31pSOgRkRfmr9WYk4jKs1gxHxm4Xpjey906xcFflOhlRp2rFhERbSddZ7yi1YfUU8qT9aZKBpt+9oNjKqct86HWaDnt6Vui6Izitp1ka3PmAykDV99qFbRGSxV2xk5mvzWV05b5aFVUlNXYceYDqZRajlqZ68l0Upk8dV/fcdou0ezp52NTlrNutsxHr/wZRQZudk9rxh6cBskfDmrMSWVnFFvms6PpjHJ4mFWht19R0ypVFR3W6s1ZWhR75pO5V09R0nYmGjCF3HNGRo05fymKLfMJ88/FlbLu/x/Fu72uY2uzlBBCKWU6RYPgK3xgQVGABUUBFhSlGA4oOSgKsKAowIKiAAuKAiwoCrCgKMCCogALigIsKAqwoCjAgqIAC4oCLCgKsKAowIKiAMs3sn2rHin1NEYAAAAASUVORK5CYII=" alt="" />


                label:
for (int i = 0; i < 6; i++) { for (int j = 0; j < 6; j++) {
if (2 == j) {
continue label;
}
System.out.print(i + "----->" + j+" ");
}
System.out.println();
}
continue跳出当次循环,继续标签处代表的循环进行继续执行,所以下面的System.out.println();根本都执行不到的

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAABH4AAAAjCAIAAABtiFp0AAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAA/+AAAP/gGy1pUqAAAIeUlEQVR4nO3cL3DbaBrH8dc3RxZFdMkCX12wLcqMiIs1001QgEsrFM8YtCYX0Dl4Y9Aj6gHPpMhH16AlSXZGuEs8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ZKPNNLyMdU/ZaTlY9S3Dy+OPjZTt3hp+RjtHwvyMSf5OdM//qvdS6XlY65/7MjHiKv20R8lEwtp+RjpH4vyMeTJ2y/Lj0yedxvJ7EJaPoauP9bkU53iLxxOgqb+AZuUXxPkPhA0Vact+ST4wmEcx3L6JyE8n4Sp31rIOK0SovrHgnwSZvtczHeiRPXPkth8Evvtn8uiH9VLuEwL6R9r8kkYv/6IiEdK/2SJzSexv996zba1qEFIMkU/gzNWpy35aM899qmXqP7RNi86H+25/dapHxgZZPWPJfloz5n8b1oknGSy+mdJdD7ac4ZKFDMvFdo/svPRnuP6I7J/ZOejPbevqdfyZ3dC/qBReoabqtOOfHJ/oNpTraa2u6ogSf1jSz6G6sz/XVVoPob6x5p8DPVP6kcLIt4Zyuofa/Ixf50UMrWQ1T8a2flw/ZmT1T/W5FNd/9Sub+6UUj/9+MPt7a1S6uDgIHtPBwAAAADcT/l/swEAAAAA2BGmXgAAAABQOaZeAAAAAFA5pl4AAAAAUDmmXgAAAABQOaZeAAAAAFA5pl4AAAAAUDmmXgAAAABQOaZeAAAAAFA5pl4AAAAAUDmmXgAAAABQOaZeAAAAAFA5pl4AAAAAULn/A7Q+HDskuzsAAAAAAElFTkSuQmCC" alt="" />

java continue break 关键字 详解 区别 用法 标记 标签 使用 示例 联系的更多相关文章

  1. Java中Volatile关键字详解 (转自郑州的文武)

    java中volatile关键字的含义:http://www.cnblogs.com/aigongsi/archive/2012/04/01/2429166.html 一.基本概念 先补充一下概念:J ...

  2. Java 10 var关键字详解和示例教程

    在本文中,我将通过示例介绍新的Java SE 10特性——“var”类型.你将学习如何在代码中正确使用它,以及在什么情况下不能使用它. 介绍 Java 10引入了一个闪亮的新功能:局部变量类型推断.对 ...

  3. Java中Static关键字详解以及静态变量和成员变量的区别

    一.static关键字的特点 (1)修饰成员变量.成员方法(2)随着类的加载而加载(3)优先于对象存在(4)被所有对象共享(5)可以通过类名调用 它本身也可以通过对象名调用 例如:main()方法由j ...

  4. Java中Volatile关键字详解

    一.基本概念 先补充一下概念:Java并发中的可见性与原子性 可见性: 可见性是一种复杂的属性,因为可见性中的错误总是会违背我们的直觉.通常,我们无法确保执行读操作的线程能适时地看到其他线程写入的值, ...

  5. Java多线程-----volatile关键字详解

       volatile原理     Java语言提供了一种稍弱的同步机制,即volatile变量,用来确保将变量的更新操作通知到其他线程.当把变量声明为volatile类型后, 编译器与运行时都会注意 ...

  6. Java中Class类详解、用法及泛化

    Java中Class类及用法 Java程序在运行时,Java运行时系统一直对所有的对象进行所谓的运行时类型标识,即所谓的RTTI.这项信息纪录了每个对象所属的类.虚拟机通常使用运行时类型信息选准正确方 ...

  7. Java中Volatile关键字详解(转载)

    转载自:https://www.cnblogs.com/zhengbin/p/5654805.html 一.基本概念 先补充一下概念:Java 内存模型中的可见性.原子性和有序性. 可见性: 可见性是 ...

  8. Java的final关键字详解

    Java中的final关键字非常重要,它可以应用于类.方法以及变量.这篇文章中我将带你看看什么是final关键字?将变量,方法和类声明为final代表了什么?使用final的好处是什么?最后也有一些使 ...

  9. Java中abstract关键字详解

    abstract只能修饰类(class) 和 方法.而不能修饰成员变量.这是由于抽象的概念确定的.只有类和方法可以抽象出来,而成员变量不需要抽象. abstract修饰类 abstract之所以出现, ...

随机推荐

  1. 七牛云音频转码准备工作之如何创建音视频处理私有队列pipeline

    如何创建音视频处理私有队列 最近更新时间:2017-08-28 15:54:45 在七牛进行音视频处理,推荐使用私有队列(pipeline). 创建私有队列方法如下: 第一步 登录七牛开发者平台 ht ...

  2. hanlp大辞典

    hanlp加一个很大的词典时候遇到的问题: ,然后改为5g,5g,问题得到解决. 但是运行后还有一个问题是: 重新改为10g,10g,问题得到解决. 也就是给java虚拟机分配的内存大点.

  3. MySQL8主从配置

    最近在看MySQL的主从配置,罗列一下过程. 一.环境介绍 我使用的是两个MySQL8.0.13Windows版,Master和Slave安装的在一个机器上,Master库的端口为3306,Slave ...

  4. 有关promise的技巧

    其实promise的作用是将异步的代码转化为同步,这里的异步指的是request1,request2.

  5. Unity进阶----Lua语言知识点(2018/11/08)

    国内开发: 敏捷开发: 集中精力加班堆出来第一个版本 基本没啥大的bug 国外开发: 1).需求分析: 2).讨论 3).分模块 4).框架 5).画UML图(类图class function)(e- ...

  6. HTTP/2 资料汇总

    随着今年 5 月 14 日 HTTP/2 协议正式版的发布,越来越多的网站开始部署 HTTP/2 了.我对 HTTP 协议一直都比较有兴趣,本文汇总一些关于 HTTP/2 的资料以及我写过的文章,会持 ...

  7. 分布式服务框架介绍:最成熟的开源NIO框架Netty

    尽管JDK提供了丰富的NIO类库,网上也有很多NIO学习例程,但是直接使用Java NIO类库想要开发出稳定可靠的通信框架却并非易事,原因如下: 1)NIO的类库和API繁杂,使用麻烦,你需要熟练掌握 ...

  8. [Swift]LeetCode893. 特殊等价字符串组 | Groups of Special-Equivalent Strings

    You are given an array A of strings. Two strings S and T are special-equivalent if after any number ...

  9. [Swift]LeetCode933. 最近的请求次数 | Number of Recent Calls

    Write a class RecentCounter to count recent requests. It has only one method: ping(int t), where t r ...

  10. ubuntu16.04安装lnmp环境

     1.安装mysql sudo apt install mysql-server 2.安装nginx和php #添加nginx和php的ppa源 sudo apt-add-repository ppa ...