{"id":1444,"date":"2019-02-26T12:00:02","date_gmt":"2019-02-26T03:00:02","guid":{"rendered":"https:\/\/www.bold.ne.jp\/engineer-club\/?p=1444"},"modified":"2025-10-06T17:14:05","modified_gmt":"2025-10-06T08:14:05","slug":"java-break","status":"publish","type":"post","link":"https:\/\/www.bold.ne.jp\/engineer-club\/java-break","title":{"rendered":"Java\u306ebreak\u3068\u306f\uff1ffor\/while\/switch\u6587\u3092\u629c\u3051\u308bbreak\u306e\u4f7f\u3044\u65b9"},"content":{"rendered":"<p>Java\u306e<span>break<\/span>\u306f\u3001<strong>\u30eb\u30fc\u30d7\u6587\u3084switch\u6587\u3092\u3059\u3050\u306b\u7d42\u4e86\u3055\u305b\u3066\u3001\u629c\u3051\u308b\u305f\u3081\u306e\u3082\u306e<\/strong>\u3067\u3059\u3002\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u308b\u4e0a\u3067\u306f\u6b20\u304b\u305b\u306a\u3044\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>break\u306f\u3084\u3063\u3066\u3044\u308b\u3053\u3068\u305d\u306e\u3082\u306e\u306f\u5927\u5909\u30b7\u30f3\u30d7\u30eb\u3067\u3001\u3057\u304b\u3082\u30eb\u30fc\u30d7\u6587\u304c\u3042\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u3042\u308c\u3070\u540d\u524d\u306f\u9055\u3048\u3069\u3082\u5fc5\u305a\u3042\u308b\u3082\u306e\u3067\u3059\u306e\u3067\u3001\u4f7f\u3044\u65b9\u3082\u305d\u3093\u306a\u306b\u96e3\u3057\u3044\u3082\u306e\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u77e5\u3063\u3066\u308b\u3088\u3001\u3068\u3044\u3046\u65b9\u3082\u591a\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u305f\u3060\u3001<span>break<\/span>\u306b\u306f\u5e83\u304f\u77e5\u3089\u308c\u3066\u3044\u308b\u57fa\u672c\u7684\u306a\u3082\u306e\u3068\u306f\u5c11\u3057\u9055\u3046\u4f7f\u3044\u65b9\u304c\u3001\u5b9f\u306f\u3042\u308b\u306e\u3067\u3059\u3002\u3053\u308c\u3092\u4e0a\u624b\u304f\u4f7f\u3046\u3068\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u4f5c\u308a\u3084\u3059\u304f\u3001\u8aad\u307f\u3084\u3059\u304f\u306a\u308b\u306e\u3067\u3001\u3053\u306e\u8a18\u4e8b\u3092\u304a\u8aad\u307f\u306b\u306a\u3063\u3066\u3001\u305c\u3072\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u305f\u3060\u304d\u305f\u3044\u3067\u3059<span>!!<\/span><\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001<span>break<\/span>\u306b\u3064\u3044\u3066\u57fa\u672c\u304b\u3089\u3061\u3087\u3063\u3068\u3057\u305f\u5fdc\u7528\u307e\u3067\u3001\u5e45\u5e83\u304f\u521d\u5fc3\u8005\u5411\u3051\u306b\u304a\u4f1d\u3048\u3057\u307e\u3059\u3002<\/p>\n<p>\u203b\u3053\u306e\u8a18\u4e8b\u306e\u30b5\u30f3\u30d7\u30eb\u306f\u3001<span>Java 11<\/span>\u306e\u74b0\u5883\u3067\u52d5\u4f5c\u78ba\u8a8d\u3057\u3066\u3044\u307e\u3059<\/p>\n<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">\u76ee\u6b21<\/p><ul class=\"toc_list\"><li><a href=\"#Javabreak\">\uff11\uff0e\u3010Java\u3011break\u306e\u57fa\u672c<\/a><ul><li><a href=\"#-forwhiledo-whilebreak\">\uff11-\uff11\uff0e\u30eb\u30fc\u30d7(for\/while\/do-while\u6587)\u3067\u306ebreak<\/a><\/li><li><a href=\"#-break\">\uff11-\uff12\uff0e\u30cd\u30b9\u30c8\u3057\u305f\u30eb\u30fc\u30d7\u6587\u304b\u3089\u306ebreak<\/a><\/li><li><a href=\"#-switchbreak\">\uff11-\uff13\uff0eswitch\u6587\u3067\u306ebreak<\/a><\/li><li><a href=\"#-switchbreak-2\">\uff11-\uff14\uff0e\u30cd\u30b9\u30c8\u3057\u305fswitch\u6587\u304b\u3089\u306ebreak<\/a><\/li><li><a href=\"#-switchbreak-3\">\uff11-\uff15\uff0e\u30cd\u30b9\u30c8\u3057\u305f\u30eb\u30fc\u30d7\u6587\u30fbswitch\u6587\u304b\u3089\u306ebreak<\/a><\/li><\/ul><\/li><li><a href=\"#break\">\uff12\uff0e\u3010\u767a\u5c55\u3011break\u306f\u5b9f\u306f\u30d6\u30ed\u30c3\u30af\u3092\u629c\u3051\u308b\u305f\u3081\u306e\u3082\u306e<\/a><ul><li><a href=\"#-break-2\">\uff12-\uff11\uff0ebreak\u3068\u30e9\u30d9\u30eb\u3068\u30d6\u30ed\u30c3\u30af\u306e\u95a2\u4fc2<\/a><\/li><li><a href=\"#i\">\uff12-\uff12\uff0e\u30e9\u30d9\u30eb\u306e\u4ed8\u3051\u65b9<\/a><\/li><li><a href=\"#-break-3\">\uff12-\uff13\uff0e\u30e9\u30d9\u30eb\u3092\u4f7f\u3063\u305f\u30d6\u30ed\u30c3\u30af\u304b\u3089\u306ebreak<\/a><\/li><li><a href=\"#-break-4\">\uff12-\uff14\uff0e\u30e9\u30d9\u30eb\u3092\u4f7f\u3063\u305fbreak\u306f\u3069\u3046\u3044\u3046\u6642\u306b\u4f7f\u3046\u306e\u304b<\/a><\/li><\/ul><\/li><li><a href=\"#break-2\">\uff13\uff0e\u3010\u767a\u5c55\u3011break\u306e\u3044\u308d\u3044\u308d<\/a><ul><li><a href=\"#-Streambreak\">\uff13-\uff11\uff0eStream\u3067\u306fbreak\u3067\u304d\u306a\u3044<\/a><\/li><li><a href=\"#-break-5\">\uff13-\uff12\uff0e\u30eb\u30fc\u30d7\u3067\u306f\u306a\u308b\u3079\u304f\u65e9\u3044\u30bf\u30a4\u30df\u30f3\u30b0\u3067break\u3059\u3079\u304d<\/a><\/li><\/ul><\/li><li><a href=\"#i-2\">\uff14\uff0e\u307e\u3068\u3081<\/a><\/li><\/ul><\/div>\n<h2><span id=\"Javabreak\">\uff11\uff0e\u3010Java\u3011break\u306e\u57fa\u672c<\/span><\/h2>\n<p>\u3053\u3053\u3067\u306f<span>break<\/span>\u306e\u57fa\u672c\u3092\u5b66\u3073\u307e\u3057\u3087\u3046\u3002<span>break<\/span>\u306f<span>for\/while\/do-while<\/span>\u6587\u3067\u306e\u30eb\u30fc\u30d7\u3084<span>switch<\/span>\u6587\u3067\u4f7f\u3046\u306e\u304c\u666e\u901a\u3067\u3059\u306e\u3067\u3001\u305d\u308c\u305e\u308c\u5b9f\u4f8b\u3092\u4ea4\u3048\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001<span>break<\/span>\u3092\u5b9f\u884c\u3059\u308b\u6642\u306f\u300c<span>break<\/span>\u3059\u308b\u300d\u3068\u3044\u3046\u3088\u3046\u306b\u547c\u3076\u306e\u304c\u666e\u901a\u306a\u306e\u3067\u3001\u4ee5\u4e0b\u3067\u3082\u540c\u3058\u3088\u3046\u306b\u547c\u3076\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n<h3><span id=\"-forwhiledo-whilebreak\">\uff11-\uff11\uff0e\u30eb\u30fc\u30d7<span>(for\/while\/do-while<\/span>\u6587<span>)<\/span>\u3067\u306e<span>break<\/span><\/span><\/h3>\n<p>for\u6587\u3001<span>while<\/span>\u6587\u3001<span>do-while<\/span>\u6587\u306a\u3069\u306e\u30eb\u30fc\u30d7\u4e2d\u3067<span>break<\/span>\u3059\u308b\u3068\u3001\u73fe\u5728\u5b9f\u884c\u3057\u3066\u3044\u308b\u30eb\u30fc\u30d7\u6587\u305d\u306e\u3082\u306e\u3092\u629c\u3051\u3066\u3001\u30eb\u30fc\u30d7\u6587\u306e\u6b21\u306e\u51e6\u7406\u306b\u79fb\u308a\u307e\u3059\u3002<span>break<\/span>\u306f\u30eb\u30fc\u30d7\u6587\u4e2d\u306e\u3069\u3053\u304b\u3089\u3067\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u30eb\u30fc\u30d7\u6587\u3067<span>break<\/span>\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u306f\u3001\u3082\u3046\u305d\u306e\u30eb\u30fc\u30d7\u6587\u3067\u306f\u3059\u3079\u304d\u3053\u3068\u304c\u306a\u3044\u3068\u5224\u65ad\u3057\u305f\u3001\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002\u3067\u3059\u306e\u3067\u3001\u30eb\u30fc\u30d7\u6587\u3067\u306e<span>break<\/span>\u306f\u3001<span>break<\/span>\u3059\u3079\u304d\u304b\u5224\u65ad\u3059\u308b<span>if<\/span>\u6587\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u306e\u304c\u666e\u901a\u3067\u3059\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">System.out.println(\"for\u6587\u3092\u5b9f\u884c\u3057\u307e\u3059\");\r\n\r\nfor (int i = 0 ; i &lt; 5; i++) {\r\n\tSystem.out.println(\"\u4eca\u306f\" + i + \"\u3067\u3059\");\r\n\r\n\tif (i == 2) {\r\n\t\tSystem.out.println(\"for\u6587\u3092\u629c\u3051\u307e\u3059\");\r\n\t\tbreak;\r\n\t}\r\n}\r\n\r\nSystem.out.println(\"for\u6587\u3092\u629c\u3051\u307e\u3057\u305f\");<\/pre>\n<p><span class=\"f-marker-p\"><strong>\u5b9f\u884c\u7d50\u679c<\/strong><\/span><\/p>\n<pre class=\"prettyprint lang:default decode:true\">for\u6587\u3092\u5b9f\u884c\u3057\u307e\u3059\r\n\u4eca\u306f0\u3067\u3059\r\n\u4eca\u306f1\u3067\u3059\r\n\u4eca\u306f2\u3067\u3059\r\nfor\u6587\u3092\u629c\u3051\u307e\u3059\r\nfor\u6587\u3092\u629c\u3051\u307e\u3057\u305f<\/pre>\n<pre class=\"prettyprint lang:default decode:true\">System.out.println(\"while\u6587\u3092\u5b9f\u884c\u3057\u307e\u3059\");\r\nint i = 0;\r\n\r\nwhile (i &lt; 5) {\r\n\tSystem.out.println(\"\u4eca\u306f\" + i + \"\u3067\u3059\");\r\n\r\n\tif (i == 2) {\r\n\t\tSystem.out.println(\"while\u6587\u3092\u629c\u3051\u307e\u3059\");\r\n\t\tbreak;\r\n\t}\r\n\r\n\ti++;\r\n}\r\n\r\nSystem.out.println(\"while\u6587\u3092\u629c\u3051\u307e\u3057\u305f\");<\/pre>\n<p><strong><span class=\"f-marker-p\">\u5b9f\u884c\u7d50\u679c<\/span><\/strong><\/p>\n<pre class=\"prettyprint lang:default decode:true\">while\u6587\u3092\u5b9f\u884c\u3057\u307e\u3059\r\n\u4eca\u306f0\u3067\u3059\r\n\u4eca\u306f1\u3067\u3059\r\n\u4eca\u306f2\u3067\u3059\r\nwhile\u6587\u3092\u629c\u3051\u307e\u3059\r\nwhile\u6587\u3092\u629c\u3051\u307e\u3057\u305f<\/pre>\n<pre class=\"prettyprint lang:default decode:true\">System.out.println(\"do-while\u6587\u3092\u5b9f\u884c\u3057\u307e\u3059\");\r\nint i = 0;\r\n\r\ndo {\r\n\tSystem.out.println(\"\u4eca\u306f\" + i + \"\u3067\u3059\");\r\n\r\n\tif (i == 2) {\r\n\t\tSystem.out.println(\"do-while\u6587\u3092\u629c\u3051\u307e\u3059\");\r\n\t\tbreak;\r\n\t}\r\n\r\n\ti++;\r\n} while (i &lt; 5);\r\n\r\nSystem.out.println(\"do-while\u6587\u3092\u629c\u3051\u307e\u3057\u305f\");<\/pre>\n<p><strong><span class=\"f-marker-p\">\u5b9f\u884c\u7d50\u679c<\/span><\/strong><\/p>\n<pre class=\"prettyprint lang:default decode:true\">do-while\u6587\u3092\u5b9f\u884c\u3057\u307e\u3059\r\n\u4eca\u306f0\u3067\u3059\r\n\u4eca\u306f1\u3067\u3059\r\n\u4eca\u306f2\u3067\u3059\r\ndo-while\u6587\u3092\u629c\u3051\u307e\u3059\r\ndo-while\u6587\u3092\u629c\u3051\u307e\u3057\u305f<\/pre>\n<h4>\uff11-\uff11-\uff11\uff0ebreak\u3068<span>continue<\/span>\u306e\u9055\u3044\u306f\u30eb\u30fc\u30d7\u304c\u7d42\u308f\u3063\u305f\u3042\u3068\u306e\u52d5\u304d<\/h4>\n<p>break\u3068<span>continue<\/span>\u306f\u300c\u4eca\u5b9f\u884c\u3057\u3066\u3044\u308b\u30eb\u30fc\u30d7\u3092\u7d42\u308f\u3089\u305b\u308b\u300d\u3068\u3044\u3046\u5f79\u5272\u306f\u540c\u3058\u3067\u3059\u304c\u3001\u7d42\u308f\u3089\u305b\u305f\u3042\u3068\u306b\u3069\u3046\u3059\u308b\u304b\u304c\u9055\u3044\u307e\u3059\u3002\u30eb\u30fc\u30d7\u6587\u305d\u306e\u3082\u306e\u3092\u629c\u3051\u308b\u304b<span>(break)<\/span>\u3001\u6b21\u306e\u30eb\u30fc\u30d7\u3092\u884c\u3046\u304b<span>(continue)<\/span>\u3067\u3059\u3002<span>continue<\/span>\u3068\u3044\u3046\u8a00\u8449\u306f\u300c\u7d9a\u3051\u308b\u300d\u3067\u3059\u3057\u3001\u30a4\u30e1\u30fc\u30b8\u7684\u306b\u3082\u3074\u3063\u305f\u308a\u3067\u3059\u3088\u306d\u3002<\/p>\n<h3><span id=\"-break\">\uff11-\uff12\uff0e\u30cd\u30b9\u30c8\u3057\u305f\u30eb\u30fc\u30d7\u6587\u304b\u3089\u306e<span>break<\/span><\/span><\/h3>\n<p>for\/while\/do-while\u6587\u306f\u30cd\u30b9\u30c8<span>(nest<\/span>\u3001\u5165\u308c\u5b50\u3001\u4f55\u304b\u306e\u4e2d\u306b\u4f55\u304b\u3092\u542b\u3080\u3053\u3068<span>)<\/span>\u3055\u305b\u3089\u308c\u307e\u3059\u3002\u30eb\u30fc\u30d7\u5206\u304c\u30cd\u30b9\u30c8\u3057\u305f\u72b6\u614b\u3067<span>break<\/span>\u3059\u308b\u3068\u3001<span>break<\/span>\u3057\u305f\u3068\u3053\u308d\u304b\u3089\u300c\u6700\u3082\u8fd1\u3044\u300d\u30eb\u30fc\u30d7\u304b\u3089\u629c\u3051\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u4ee5\u4e0b\u3067\u306f\u3001<span>break<\/span>\u3057\u3066\u3044\u308b\u3068\u3053\u308d\u304b\u3089\u300c\u4e0a\u3078\u300d\u305f\u3069\u3063\u3066\u3044\u3063\u3066\u3001\u3082\u3063\u3068\u3082\u8fd1\u3044\u30eb\u30fc\u30d7\u6587\u3067\u3042\u308b\u300c<span>j<\/span>\u306e<span>for<\/span>\u6587\u300d\u3092<span>break<\/span>\u3057\u307e\u3059\u3002\u3067\u3059\u304b\u3089\u300c<span>i<\/span>\u306e<span>for<\/span>\u6587\u300d\u306f\u305d\u306e\u307e\u307e\u4f55\u4e8b\u3082\u306a\u304b\u3063\u305f\u304b\u306e\u3088\u3046\u306b\u7d9a\u304f\u306e\u3067\u3059\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">System.out.println(\"\u30cd\u30b9\u30c8\u3057\u305ffor\u6587\u3092\u5b9f\u884c\u3057\u307e\u3059\");\r\n\r\nfor (int i = 0; i &lt; 2; i++) {\r\n\tSystem.out.println(\"\u4eca\u306f i = \" + i + \"\u3067\u3059\");\r\n\r\n\tfor (int j = 0; j &lt; 2; j++) {\r\n\t\tSystem.out.println(\"  \u4eca\u306f j = \" + j + \"\u3067\u3059\");\r\n\r\n\t\tif (j == 1) {\r\n\t\t\tSystem.out.println(\"  j\u306efor\u6587\u3092\u629c\u3051\u307e\u3059\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nSystem.out.println(\"\u30cd\u30b9\u30c8\u3057\u305ffor\u6587\u3092\u629c\u3051\u307e\u3057\u305f\");<\/pre>\n<p><strong><span class=\"f-marker-p\">\u5b9f\u884c\u7d50\u679c<\/span><\/strong><\/p>\n<pre class=\"prettyprint lang:default decode:true\">\u30cd\u30b9\u30c8\u3057\u305ffor\u6587\u3092\u5b9f\u884c\u3057\u307e\u3059\r\n\u4eca\u306f i = 0\u3067\u3059\r\n  \u4eca\u306f j = 0\u3067\u3059\r\n  \u4eca\u306f j = 1\u3067\u3059\r\n  j\u306efor\u6587\u3092\u629c\u3051\u307e\u3059\r\n\u4eca\u306f i = 1\u3067\u3059\r\n  \u4eca\u306f j = 0\u3067\u3059\r\n  \u4eca\u306f j = 1\u3067\u3059\r\n  j\u306efor\u6587\u3092\u629c\u3051\u307e\u3059\r\n\u30cd\u30b9\u30c8\u3057\u305ffor\u6587\u3092\u629c\u3051\u307e\u3057\u305f<\/pre>\n<p>\u3067\u3059\u306e\u3067\u3001\u30eb\u30fc\u30d7\u304c\u30cd\u30b9\u30c8\u3057\u305f\u72b6\u614b\u3067<span>break<\/span>\u3092\u3059\u308b\u3068\u3001\u610f\u56f3\u3057\u305f\u3068\u304a\u308a\u306e<span>break<\/span>\u304c\u96e3\u3057\u304f\u306a\u308a\u307e\u3059\u3002\u3082\u3046\u3053\u306e\u30eb\u30fc\u30d7\u5168\u4f53\u3092\u7d42\u308f\u3063\u3066\u3082\u3044\u3044\u3068\u3001\u30cd\u30b9\u30c8\u304c\u6df1\u3044\u3068\u3053\u308d\u306b\u3042\u308b\u30eb\u30fc\u30d7\u6587\u3067\u5206\u304b\u3063\u305f\u5834\u5408\u306f\u9762\u5012\u3067\u3059\u3002\u30eb\u30fc\u30d7\u5168\u4f53\u306e\u7d99\u7d9a\u8981\u5426\u3092\u7ba1\u7406\u3059\u308b\u5909\u6570\u3092\u4f7f\u3063\u305f\u308a\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u3046\u3044\u3046\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u8907\u96d1\u306b\u306a\u308a\u304c\u3061\u3067\u3059\u3002\u3057\u304b\u3057<span>!! <\/span>\u305d\u3046\u3044\u3046\u7528\u9014\u306b\u4f7f\u3048\u308b\u3088\u3046\u3001\u3044\u304f\u3089\u30eb\u30fc\u30d7\u304c\u6df1\u304f\u306a\u3063\u3066\u3082\u30eb\u30fc\u30d7\u5168\u4f53\u3092\u4e00\u6c17\u306b<span>break<\/span>\u3059\u308b\u3084\u308a\u65b9\u304c\u3061\u3083\u3093\u3068\u3042\u308b\u306e\u3067\u3054\u5b89\u5fc3\u304f\u3060\u3055\u3044\u3002\u305d\u308c\u306b\u3064\u3044\u3066\u306f\u5f8c\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<h3><span id=\"-switchbreak\">\uff11-\uff13\uff0eswitch\u6587\u3067\u306e<span>break<\/span><\/span><\/h3>\n<p>switch\u6587\u3067\u306e<span>break<\/span>\u306f\u3001\u30eb\u30fc\u30d7\u6587\u3068\u4f3c\u305f\u3088\u3046\u306a\u610f\u5473\u3092\u6301\u3061\u3001<span>switch<\/span>\u6587\u304b\u3089\u629c\u3051\u308b\u52d5\u304d\u3092\u3057\u307e\u3059\u3002<\/p>\n<p>Java\u306e<span>switch<\/span>\u6587\u3067\u8981\u6ce8\u610f\u306a\u306e\u304c\u3001<span>break<\/span>\u3092\u3057\u306a\u3051\u308c\u3070\u6b21\u306b\u3042\u308b<span>case<\/span>\u306b\u51e6\u7406\u304c\u79fb\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u3067\u3059\u3002\u3053\u306e\u52d5\u304d\u3092\u300c\u30d5\u30a9\u30fc\u30eb\u30b9\u30eb\u30fc<span>(fall through)<\/span>\u300d\u3068\u3082\u547c\u3076\u306e\u3067\u3059\u304c\u3001<span>break<\/span>\u306f\u305d\u308c\u3092\u6b62\u3081\u308b\u305f\u3081\u306b\u3082\u3042\u308b\u3082\u306e\u3067\u3059\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">int i = 1;\r\nSystem.out.println(\"switch\u6587\u3092\u5b9f\u884c\u3057\u307e\u3059\");\r\n\r\nswitch (i) {\r\ncase 1:\r\n\tSystem.out.println(\"case 1\u3067\u3059\");\r\n\tbreak;\r\ncase 2:\r\n\tSystem.out.println(\"case 2\u3067\u3059\");\r\ncase 3:\r\n\tSystem.out.println(\"case 3\u3067\u3059\");\r\n\tbreak;\r\n}\r\n\r\nSystem.out.println(\"switch\u6587\u3092\u629c\u3051\u307e\u3057\u305f\");<\/pre>\n<p><strong><span class=\"f-marker-p\">\u5b9f\u884c\u7d50\u679c<\/span><\/strong><\/p>\n<pre class=\"prettyprint lang:default decode:true\">switch\u6587\u3092\u5b9f\u884c\u3057\u307e\u3059\r\ncase 1\u3067\u3059\r\nswitch\u6587\u3092\u629c\u3051\u307e\u3057\u305f<\/pre>\n<pre class=\"prettyprint lang:default decode:true\">int i = 2; \/\/ i\u306e\u5024\u306f2\r\nSystem.out.println(\"switch\u6587\u3092\u5b9f\u884c\u3057\u307e\u3059\");\r\n\r\nswitch (i) {\r\ncase 1:\r\n\tSystem.out.println(\"case 1\u3067\u3059\");\r\n\tbreak;\r\ncase 2:\r\n\tSystem.out.println(\"case 2\u3067\u3059\"); \/\/ \u3053\u3053\u306b\u6765\u3066\u2026\r\ncase 3:\r\n\tSystem.out.println(\"case 3\u3067\u3059\"); \/\/ case 2\u306b\u306fbreak\u304c\u306a\u3044\u306e\u3067\u3053\u3053\u306b\u6765\u308b!!\r\n\tbreak;\r\n}\r\n\r\nSystem.out.println(\"switch\u6587\u3092\u629c\u3051\u307e\u3057\u305f\");<\/pre>\n<p><strong><span class=\"f-marker-p\">\u5b9f\u884c\u7d50\u679c<\/span><\/strong><\/p>\n<pre class=\"prettyprint lang:default decode:true\">switch\u6587\u3092\u5b9f\u884c\u3057\u307e\u3059\r\ncase 2\u3067\u3059\r\ncase 3\u3067\u3059\r\nswitch\u6587\u3092\u629c\u3051\u307e\u3057\u305f<\/pre>\n<h3><span id=\"-switchbreak-2\">\uff11-\uff14\uff0e\u30cd\u30b9\u30c8\u3057\u305f<span>switch<\/span>\u6587\u304b\u3089\u306e<span>break<\/span><\/span><\/h3>\n<p>\u30eb\u30fc\u30d7\u6587\u3068\u540c\u3058\u3088\u3046\u306b\u3001<span>switch<\/span>\u6587\u3082\u30cd\u30b9\u30c8\u3067\u304d\u307e\u3059\u3002\u305d\u306e\u5834\u5408\u3082<span>for<\/span>\u6587\u3068\u540c\u3058\u3067\u3001<span>break<\/span>\u3092\u3057\u305f\u3068\u3053\u308d\u304b\u3089\u300c\u6700\u3082\u8fd1\u3044\u300d<span>switch<\/span>\u6587\u3092<span>break<\/span>\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">int i = 2; \/\/ i\u306e\u5024\u306f2\u3001\r\nSystem.out.println(\"switch\u6587\u3092\u5b9f\u884c\u3057\u307e\u3059\");\r\n\r\nswitch (i) {\r\ncase 1:\r\n\tSystem.out.println(\"i\u306ecase 1\u3067\u3059\");\r\n\tbreak;\r\ncase 2:\r\n\tSystem.out.println(\"i\u306ecase 2\u3067\u3059\"); \/\/ \u3060\u304b\u3089\u3053\u3053\u306b\u6765\u3066\u3001\r\n\tint j = 1; \/\/ j\u306e\u5024\u306f1\u306a\u306e\u3067\u2026\r\n\r\n\tswitch (j) {\r\n\tcase 1:\r\n\t\tSystem.out.println(\"  j\u306ecase 1\u3067\u3059\"); \/\/ \u3055\u3089\u306b\u3053\u3053\u306b\u6765\u3066\u2026\r\n\t\tbreak; \/\/ \u3053\u3053\u304b\u3089break\u3059\u308b\u3068j\u306eswitch\u306f\u629c\u3051\u308b\u3051\u308c\u3069\u3082\u3001\r\n\tcase 2:\r\n\t\tSystem.out.println(\"  j\u306ecase 2\u3067\u3059\");\r\n\tcase 3:\r\n\t\tSystem.out.println(\"  j\u306ecase 3\u3067\u3059\");\r\n\t}\r\ncase 3:\r\n\tSystem.out.println(\"i\u306ecase 3\u3067\u3059\"); \/\/ i\u306ecase 2\u306fbreak\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u3053\u3053\u306b\u6765\u308b!!\r\n\tbreak;\r\n}\r\n\r\nSystem.out.println(\"switch\u6587\u3092\u629c\u3051\u307e\u3057\u305f\");<\/pre>\n<p><strong><span class=\"f-marker-p\">\u5b9f\u884c\u7d50\u679c<\/span><\/strong><\/p>\n<pre class=\"prettyprint lang:default decode:true\">switch\u6587\u3092\u5b9f\u884c\u3057\u307e\u3059\r\ni\u306ecase 2\u3067\u3059\r\n  j\u306ecase 1\u3067\u3059\r\ni\u306ecase 3\u3067\u3059\r\nswitch\u6587\u3092\u629c\u3051\u307e\u3057\u305f<\/pre>\n<h3><span id=\"-switchbreak-3\">\uff11-\uff15\uff0e\u30cd\u30b9\u30c8\u3057\u305f\u30eb\u30fc\u30d7\u6587\u30fb<span>switch<\/span>\u6587\u304b\u3089\u306e<span>break<\/span><\/span><\/h3>\n<p>\u3082\u3061\u308d\u3093\u3001\u30eb\u30fc\u30d7\u6587\u3068<span>switch<\/span>\u6587\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u3059\u3002\u305d\u306e\u5834\u5408\u3067\u3082\u30eb\u30fc\u30eb\u306f\u540c\u3058\u3067\u3001<span>break<\/span>\u3092\u3057\u305f\u3068\u3053\u308d\u304b\u3089\u6700\u3082\u8fd1\u3044\u30e2\u30ce\u3092<span>break<\/span>\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">System.out.println(\"for\u6587\u3092\u5b9f\u884c\u3057\u307e\u3059\");\r\n\r\nfor (int i = 0; i &lt; 2; i++) {\r\n\tSystem.out.println(\"\u4eca\u306f i = \" + i + \"\u3067\u3059\");\r\n\tSystem.out.println(\"switch\u6587\u3092\u5b9f\u884c\u3057\u307e\u3059\");\r\n\r\n\tswitch (i) {\r\n\tcase 0:\r\n\t\tSystem.out.println(\"  case 0\u3067\u3059\");\r\n\t\tbreak;\r\n\tcase 1:\r\n\t\tSystem.out.println(\"  case 1\u3067\u3059\");\r\n\t\tbreak;\r\n\tcase 2:\r\n\t\tSystem.out.println(\"  case 2\u3067\u3059\");\r\n\t\tbreak;\r\n\t}\r\n\r\n\tSystem.out.println(\"switch\u6587\u3092\u629c\u3051\u307e\u3057\u305f\");\r\n}\r\n\r\nSystem.out.println(\"for\u6587\u3092\u629c\u3051\u307e\u3057\u305f\");<\/pre>\n<p><strong><span class=\"f-marker-p\">\u5b9f\u884c\u7d50\u679c<\/span><\/strong><\/p>\n<pre class=\"prettyprint lang:default decode:true\">for\u6587\u3092\u5b9f\u884c\u3057\u307e\u3059\r\n\u4eca\u306f i = 0\u3067\u3059\r\nswitch\u6587\u3092\u5b9f\u884c\u3057\u307e\u3059\r\n  case 0\u3067\u3059\r\nswitch\u6587\u3092\u629c\u3051\u307e\u3057\u305f\r\n\u4eca\u306f i = 1\u3067\u3059\r\nswitch\u6587\u3092\u5b9f\u884c\u3057\u307e\u3059\r\n  case 1\u3067\u3059\r\nswitch\u6587\u3092\u629c\u3051\u307e\u3057\u305f\r\nfor\u6587\u3092\u629c\u3051\u307e\u3057\u305f<\/pre>\n<h2><span id=\"break\">\uff12\uff0e\u3010\u767a\u5c55\u3011<span>break<\/span>\u306f\u5b9f\u306f\u30d6\u30ed\u30c3\u30af\u3092\u629c\u3051\u308b\u305f\u3081\u306e\u3082\u306e<\/span><\/h2>\n<h3><span id=\"-break-2\">\uff12-\uff11\uff0ebreak\u3068\u30e9\u30d9\u30eb\u3068\u30d6\u30ed\u30c3\u30af\u306e\u95a2\u4fc2<\/span><\/h3>\n<p>break\u306f\u3001\u5b9f\u306f\u30d6\u30ed\u30c3\u30af\u3092\u629c\u3051\u308b\u305f\u3081\u306e\u3082\u306e\u306a\u306e\u3067\u3059\u3002<span>for\/while\/do-wihle<\/span>\u6587\u3001<span>switch<\/span>\u6587\u306e\u4e2d\u3067\u3057\u304b\u4f7f\u3048\u306a\u3044\u3082\u306e\u3067\u306f\u306a\u304b\u3063\u305f\u308a\u3057\u307e\u3059\u3002<\/p>\n<p>\u30d6\u30ed\u30c3\u30af\u3068\u306f\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u4e2d\u3067<span> &#8220;{}&#8221; <\/span>\u3067\u56f2\u307e\u308c\u305f\u90e8\u5206\u3092\u8868\u3059\u8a00\u8449\u3067\u3059\u3002<span>for\/while\/do-while<\/span>\u6587\u306e<span>{}<\/span>\u3001<span>switch<\/span>\u6587\u306e<span>{}<\/span>\u3001<span>if<\/span>\u6587\u306e<span>{}<\/span>\u3001<span>try<\/span>\u306e<span>{}<\/span>\u306a\u3069\u3001\u305d\u308c\u3089\u306f\u3059\u3079\u3066\u30d6\u30ed\u30c3\u30af\u3067\u3059\u3002\u305d\u3057\u3066\u3001\u30d6\u30ed\u30c3\u30af\u306f\u305d\u308c\u3089\u306e\u69cb\u6587\u3068\u306f\u95a2\u4fc2\u306a\u304f\u3001\u81ea\u7531\u306b\u4f5c\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3082\u306e\u3067\u3059\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">\/\/ \u305f\u3060\u306e\u5909\u54f2\u3082\u306a\u3044\u30d6\u30ed\u30c3\u30af\u3092\u4f5c\u308b\u4f8b\r\n{\r\n\tSystem.out.println(\"\u305f\u3060\u306e\u30d6\u30ed\u30c3\u30af\u3067\u30fc\u3059\");\r\n}<\/pre>\n<p>\u4eca\u307e\u3067\u898b\u3066\u304d\u305f<span>break<\/span>\u306f\u3001\u629c\u3051\u308b\u30d6\u30ed\u30c3\u30af\u3092\u30d7\u30ed\u30b0\u30e9\u30de\u304c\u6307\u5b9a\u3057\u306a\u3044\u6642\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u52d5\u304d\u3067\u3059\u3002\u30eb\u30fc\u30d7\u6587\u3084<span>switch<\/span>\u6587\u3067\u306f\u3001<span>break<\/span>\u3092\u3057\u305f\u5834\u6240\u304b\u3089\u6700\u3082\u8fd1\u3044\u30eb\u30fc\u30d7\u6587\u30fb<span>switch<\/span>\u6587\u306e\u30d6\u30ed\u30c3\u30af\u304c\u9078\u3070\u308c\u3066<span>break<\/span>\u3055\u308c\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>break\u3067\u3069\u306e\u30d6\u30ed\u30c3\u30af\u304b\u3089\u629c\u3051\u308b\u304b\u306f\u300c\u30e9\u30d9\u30eb\u300d\u3068\u3044\u3046\u6587\u5b57\u5217\u3067\u6307\u5b9a\u3067\u304d\u307e\u3059\u3002\u30e9\u30d9\u30eb\u3092\u4f7f\u3063\u3066\u3001\u30d6\u30ed\u30c3\u30af\u306b\u540d\u524d\u3092\u307a\u305f\u308a\u3068\u8cbc\u308a\u4ed8\u3051\u308b\u30a4\u30e1\u30fc\u30b8\u3067\u3059\u3002\u305d\u3046\u3057\u3066\u4ed8\u3051\u305f\u30e9\u30d9\u30eb\u3067<span>break<\/span>\u3059\u308b\u3068\u3001\u305d\u306e\u30e9\u30d9\u30eb\u4ed8\u3051\u3055\u308c\u305f\u30d6\u30ed\u30c3\u30af\u3092\u629c\u3051\u307e\u3059\u3002<\/p>\n<p>\u307e\u3042\u3001\u7269\u306f\u8a66\u3057\u3067\u3059\u3002\u30d6\u30ed\u30c3\u30af\u306b\u30e9\u30d9\u30eb\u3092\u4ed8\u3051\u308b\u3068\u3053\u308d\u304b\u3089\u3001\u30e9\u30d9\u30eb\u4ed8\u304d\u30d6\u30ed\u30c3\u30af\u3092<span>break<\/span>\u3059\u308b\u3068\u3053\u308d\u307e\u3067\u3092\u3056\u3063\u3068\u4e00\u901a\u308a\u3084\u3063\u3066\u307f\u307e\u3057\u3087\u3046<span>!!<\/span><\/p>\n<h3><span id=\"i\">\uff12-\uff12\uff0e\u30e9\u30d9\u30eb\u306e\u4ed8\u3051\u65b9<\/span><\/h3>\n<h4>\uff12-\uff12-\uff11\uff0e\u30e9\u30d9\u30eb\u306f\u6587\u5b57\u5217<span> + &#8220;:&#8221;<\/span>\u3067\u3064\u3051\u308b<\/h4>\n<p>\u30e9\u30d9\u30eb\u306f\u3001\u30e9\u30d9\u30eb\u6587\u5b57\u5217\u306e\u5f8c\u308d\u306b\u30b3\u30ed\u30f3<span>(:)<\/span>\u3092\u4ed8\u3051\u308b\u3068\u5ba3\u8a00\u3067\u304d\u307e\u3059\u3002\u30e9\u30d9\u30eb\u6587\u5b57\u5217\u306b\u306f\u666e\u901a\u306e\u5909\u6570\u306a\u3069\u3068\u540c\u3058\u6587\u5b57\u304c\u4f7f\u3048\u307e\u3059\u3002\u30e9\u30d9\u30eb\u6587\u5b57\u5217\u306f\u3001\u30e9\u30d9\u30eb\u3060\u3068\u3059\u3050\u5206\u304b\u308b\u3088\u3046\u306b\u3001\u5927\u6587\u5b57\u304c\u4f7f\u308f\u308c\u308b\u3053\u3068\u304c\u666e\u901a\u3067\u3059\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">\u30e9\u30d9\u30eb\u6587\u5b57\u5217:<\/pre>\n<h4>\uff12-\uff12-\uff12\uff0e\u30d6\u30ed\u30c3\u30af\u3078\u306e\u30e9\u30d9\u30eb\u4ed8\u3051\u306f\u30d6\u30ed\u30c3\u30af\u306e\u5148\u982d\u3067\u884c\u3046<\/h4>\n<p>\u30d6\u30ed\u30c3\u30af\u306b\u30e9\u30d9\u30eb\u4ed8\u3051\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30d6\u30ed\u30c3\u30af\u306e\u59cb\u307e\u308a\u3092\u8868\u3059<span> &#8220;{&#8221; <\/span>\u306e\u524d\u306b\u30e9\u30d9\u30eb\u3092\u7f6e\u304d\u307e\u3059\u3002<span>for\/while\/do-while\/switch\/try<\/span>\u306e\u30d6\u30ed\u30c3\u30af\u306b\u30e9\u30d9\u30eb\u4ed8\u3051\u3092\u3059\u308b\u6642\u3082\u540c\u3058\u3067\u3001\u305d\u308c\u305e\u308c\u306e\u30ad\u30fc\u30ef\u30fc\u30c9\u306e\u524d\u306b\u30e9\u30d9\u30eb\u3092\u7f6e\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">LABEL: {\r\n\t\/\/ \u30d6\u30ed\u30c3\u30af\u306e\u4e2d\u8eab\r\n}\r\n\r\nLABEL: for(int i = 0; i &lt; 10; i++) {\r\n\t\/\/ \u30d6\u30ed\u30c3\u30af\u306e\u4e2d\u8eab\r\n}\r\n\r\nLABEL: while(true) {\r\n\t\/\/ \u30d6\u30ed\u30c3\u30af\u306e\u4e2d\u8eab\r\n}\r\n\r\nLABEL: do {\r\n\t\/\/ \u30d6\u30ed\u30c3\u30af\u306e\u4e2d\u8eab\r\n} while(true);\r\n\r\nint i = 0;\r\nLABEL: switch(i) {\r\ncase 0:\r\n\t\/\/ \u30d6\u30ed\u30c3\u30af\u306e\u4e2d\u8eab\r\ncase 1:\r\n}\r\n\r\nLABEL: try {\r\n\t\/\/ \u30d6\u30ed\u30c3\u30af\u306e\u4e2d\u8eab\r\n} finally {\r\n}<\/pre>\n<p>\u3082\u3061\u308d\u3093\u3001\u30e9\u30d9\u30eb\u4ed8\u3051\u3057\u305f\u30d6\u30ed\u30c3\u30af\u304c\u305f\u304f\u3055\u3093\u30cd\u30b9\u30c8\u3057\u3066\u3044\u3066\u3082\u5927\u4e08\u592b\u3067\u3059\u3002\u305d\u308c\u305e\u308c\u306e\u30d6\u30ed\u30c3\u30af\u306b\u3001\u30e9\u30d9\u30eb\u4ed8\u3051\u304c\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">LABEL1: {\r\n\t\/\/ \u3053\u3053\u306fLABEL1\u306e\u4e2d\r\n\tLABEL2: {\r\n\t\t\/\/ \u3053\u3053\u306fLABEL2\u306e\u4e2d\r\n\t\tLABEL3: {\r\n\t\t\t\/\/ \u3053\u3053\u306fLABEL3\u306e\u4e2d\r\n\t\t}\r\n\t}\r\n}<\/pre>\n<p>\u305f\u3060\u3057\u3001\u540c\u3058\u30e9\u30d9\u30eb\u306e\u30d6\u30ed\u30c3\u30af\u306e\u4e2d\u3067\u306f\u3001\u65e2\u306b\u4f7f\u308f\u308c\u3066\u3044\u308b\u30e9\u30d9\u30eb\u3092\u4f7f\u3048\u307e\u305b\u3093\u3002\u30d6\u30ed\u30c3\u30af\u306e\u533a\u5225\u304c\u4ed8\u3051\u3089\u308c\u306a\u3044\u304b\u3089\u3067\u3001\u3053\u306e\u8003\u3048\u65b9\u306f\u5909\u6570\u306e\u30b9\u30b3\u30fc\u30d7\u3068\u4f3c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3067\u3059\u304c\u3001\u5916\u306b\u3042\u308b\u9055\u3046\u30d6\u30ed\u30c3\u30af\u540c\u58eb\u306a\u3089\u540c\u3058\u30e9\u30d9\u30eb\u3067\u3082\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u3002\u306a\u305c\u304b\u3068\u8a00\u3048\u3070\u3001\u30e9\u30d9\u30eb\u306e\u6709\u52b9\u7bc4\u56f2\u306f\u7d10\u3065\u3051\u305f\u30d6\u30ed\u30c3\u30af\u306e\u4e2d\u3060\u3051\u3060\u304b\u3089\u3067\u3059\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">LABEL: {\r\n\tLABEL: { \/\/ \u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc!! \u30e9\u30d9\u30eb\u4ed8\u3051\u3055\u308c\u305f\u30d6\u30ed\u30c3\u30af\u306e\u4e2d\u3067\u306f\u3001\u540c\u3058\u30e9\u30d9\u30eb\u306f\u4f7f\u3048\u306a\u3044\r\n\t}\r\n}\r\nLABEL: { \/\/ \u5916\u306b\u3042\u308b\u9055\u3046\u30d6\u30ed\u30c3\u30af\u3078\u306a\u3089\u540c\u3058\u30e9\u30d9\u30eb\u304c\u4f7f\u3048\u308b\r\n}<\/pre>\n<h4>\uff12-\uff12-\uff13\uff0e\u3010\u53c2\u8003\u3011\u30e9\u30d9\u30eb\u306f\u6587\u3078\u4ed8\u3051\u3089\u308c\u308b\u3082\u306e<\/h4>\n<p>\u30e9\u30d9\u30eb\u306f\u5b9f\u306f\u6587<span>(Statement)<\/span>\u3068\u3057\u3066\u6271\u3048\u308b\u3082\u306e\u306b\u4ed8\u3051\u3089\u308c\u308b\u306e\u3067\u3059\u3002\u305f\u3060\u3001\u4eca\u306e<span>Java<\/span>\u306e\u69cb\u6587\u4e0a\u3067\u5b9f\u7528\u7684\u306b\u4f7f\u3048\u308b\u306e\u306f\u3001<span>break<\/span>\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u305f\u3081\u306e\u30d6\u30ed\u30c3\u30af\u3078\u306e\u30e9\u30d9\u30eb\u3067\u3059\u3002\u3053\u306e\u8a18\u4e8b\u306f<span>break<\/span>\u304c\u984c\u6750\u306a\u306e\u3067\u3001<span>break<\/span>\u3057\u305f\u3044\u30d6\u30ed\u30c3\u30af\u3078\u306e\u30e9\u30d9\u30eb\u306e\u4ed8\u3051\u65b9\u3092\u7d39\u4ecb\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">int i = 0;\r\nLABEL1: i = 100; \/\/ \u4ee3\u5165\u6587\u306b\u30e9\u30d9\u30eb\u3092\u4ed8\u3051\u308b\r\nLABEL2: System.out.println(i);  \/\/ \u666e\u901a\u306e\u6587\u306b\u30e9\u30d9\u30eb\u3092\u4ed8\u3051\u308b<\/pre>\n<h3><span id=\"-break-3\">\uff12-\uff13\uff0e\u30e9\u30d9\u30eb\u3092\u4f7f\u3063\u305f\u30d6\u30ed\u30c3\u30af\u304b\u3089\u306e<span>break<\/span><\/span><\/h3>\n<h4>\uff12-\uff13-\uff11\uff0e\u30e9\u30d9\u30eb\u4ed8\u304d\u30d6\u30ed\u30c3\u30af\u3092<span>break<\/span>\u3059\u308b<\/h4>\n<p>\u3044\u3088\u3044\u3088\u30e9\u30d9\u30eb\u4ed8\u304d\u30d6\u30ed\u30c3\u30af\u3092<span>break<\/span>\u3057\u3066\u307f\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001<span>break<\/span>\u306e\u5f8c\u308d\u306b<span>break<\/span>\u3057\u305f\u3044\u30e9\u30d9\u30eb\u6587\u5b57\u5217\u3092\u6307\u5b9a\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">break \u30e9\u30d9\u30eb\u6587\u5b57\u5217;<\/pre>\n<pre class=\"prettyprint lang:default decode:true\">System.out.println(\"\u30e9\u30d9\u30eb\u4ed8\u304d\u30d6\u30ed\u30c3\u30af\u306b\u5165\u308a\u307e\u3059\");\r\nboolean doBreak = true;\r\n\r\nLABEL: {\r\n\tSystem.out.println(\"\u30e9\u30d9\u30eb\u4ed8\u304d\u30d6\u30ed\u30c3\u30af\u306b\u5165\u308a\u307e\u3057\u305f\"); \/\/ \u3053\u308c\u304c\u5b9f\u884c\u3055\u308c\u305f\u5f8c\u3001\r\n\r\n\tif (doBreak) {\r\n\t\tSystem.out.println(\"LABEL\u3092break\u3057\u307e\u3059\"); \/\/ \u3053\u3053\u306b\u6765\u3066\u3001\r\n\t\tbreak LABEL; \/\/ \u30e9\u30d9\u30eb\u4ed8\u304d\u30d6\u30ed\u30c3\u30af\u3092break!!\r\n\t}\r\n\r\n\tSystem.out.println(\"\u30e9\u30d9\u30eb\u4ed8\u304d\u30d6\u30ed\u30c3\u30af\u306ebreak\u3057\u305f\u5f8c\u3067\u3059\"); \/\/ \u3059\u308b\u3068\u3001\u3053\u3053\u306b\u306f\u6765\u305a\u3001\r\n}\r\n\r\nSystem.out.println(\"\u30e9\u30d9\u30eb\u4ed8\u304d\u30d6\u30ed\u30c3\u30af\u304b\u3089\u629c\u3051\u307e\u3057\u305f\"); \/\/ \u30d6\u30ed\u30c3\u30af\u3092\u629c\u3051\u305f\u3053\u3053\u306b\u6765\u308b<\/pre>\n<p><strong><span class=\"f-marker-p\">\u5b9f\u884c\u7d50\u679c<\/span><\/strong><\/p>\n<pre class=\"prettyprint lang:default decode:true\">\u30e9\u30d9\u30eb\u4ed8\u304d\u30d6\u30ed\u30c3\u30af\u306b\u5165\u308a\u307e\u3059\r\n\u30e9\u30d9\u30eb\u4ed8\u304d\u30d6\u30ed\u30c3\u30af\u306b\u5165\u308a\u307e\u3057\u305f\r\nLABEL\u3092break\u3057\u307e\u3059\r\n\u30e9\u30d9\u30eb\u4ed8\u304d\u30d6\u30ed\u30c3\u30af\u304b\u3089\u629c\u3051\u307e\u3057\u305f<\/pre>\n<p>\u305d\u3057\u3066\u3001\u30cd\u30b9\u30c8\u3057\u305f\u30d6\u30ed\u30c3\u30af\u3067\u3082\u3001\u89aa\u306e\u30d6\u30ed\u30c3\u30af\u306b\u4ed8\u3051\u305f\u30e9\u30d9\u30eb\u3092\u6307\u5b9a\u3059\u308c\u3070\u3001\u4e00\u6c17\u306b\u629c\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3059<span>!!<\/span><\/p>\n<pre class=\"prettyprint lang:default decode:true\">System.out.println(\"\u30cd\u30b9\u30c8\u3057\u305f\u30e9\u30d9\u30eb\u4ed8\u304d\u30d6\u30ed\u30c3\u30af\u306b\u5165\u308a\u307e\u3059\");\r\nboolean doBreak = true;\r\n\r\nLABEL1: {\r\n\tSystem.out.println(\"LABEL1\u306b\u5165\u308a\u307e\u3057\u305f\"); \/\/ \u3053\u308c\u304c\u5b9f\u884c\u3055\u308c\u305f\u5f8c\u3001\r\n\r\n\tLABEL2: {\r\n\t\tSystem.out.println(\"LABEL2\u306b\u5165\u308a\u307e\u3057\u305f\"); \/\/ \u3055\u3089\u306b\u3053\u308c\u304c\u5b9f\u884c\u3055\u308c\u305f\u5f8c\u3001\r\n\r\n\t\tif (doBreak) {\r\n\t\t\tSystem.out.println(\"LABEL1\u3092break\u3057\u307e\u3059\"); \/\/ \u3053\u3053\u306b\u6765\u3066\u3001\r\n\t\t\tbreak LABEL1; \/\/ \u89aa\u30d6\u30ed\u30c3\u30af\u3067\u3042\u308bLABEL1\u3092break!!\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"LABEL2\u3067break\u3057\u305f\u5f8c\u3067\u3059\"); \/\/ \u3059\u308b\u3068\u3001\u3053\u3053\u306b\u306f\u6765\u305a\u3001\r\n\t}\r\n\r\n\tSystem.out.println(\"LABEL1\u306b\u623b\u3063\u3066\u304d\u307e\u3057\u305f\"); \/\/ \u3055\u3089\u306b\u3001\u3053\u3053\u306b\u3082\u6765\u305a\u3001\r\n}\r\n\r\nSystem.out.println(\"\u30cd\u30b9\u30c8\u3057\u305f\u30e9\u30d9\u30eb\u4ed8\u304d\u30d6\u30ed\u30c3\u30af\u304b\u3089\u629c\u3051\u307e\u3057\u305f\"); \/\/ \u30d6\u30ed\u30c3\u30af\u3092\u629c\u3051\u305f\u3053\u3053\u306b\u6765\u308b<\/pre>\n<p><strong><span class=\"f-marker-p\">\u5b9f\u884c\u7d50\u679c<\/span><\/strong><\/p>\n<pre class=\"prettyprint lang:default decode:true\">\u30cd\u30b9\u30c8\u3057\u305f\u30e9\u30d9\u30eb\u4ed8\u304d\u30d6\u30ed\u30c3\u30af\u306b\u5165\u308a\u307e\u3059\r\nLABEL1\u306b\u5165\u308a\u307e\u3057\u305f\r\n  LABEL2\u306b\u5165\u308a\u307e\u3057\u305f\r\n  LABEL1\u3092break\u3057\u307e\u3059\r\n\u30cd\u30b9\u30c8\u3057\u305f\u30e9\u30d9\u30eb\u4ed8\u304d\u30d6\u30ed\u30c3\u30af\u304b\u3089\u629c\u3051\u307e\u3057\u305f<\/pre>\n<h4>\uff12-\uff13-\uff12\uff0e\u30e9\u30d9\u30eb\u4ed8\u304d\u30eb\u30fc\u30d7\u6587<span>\/switch<\/span>\u6587<span>\/try<\/span>\u6587\u3092<span>break<\/span>\u3059\u308b<\/h4>\n<p>\u3067\u306f\u3001\u30eb\u30fc\u30d7\u6587<span>\/switch<\/span>\u6587<span>\/try<\/span>\u6587\u3067\u30e9\u30d9\u30eb\u4ed8\u304d<span>break<\/span>\u3092\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u305d\u308c\u305e\u308c\u3067\u3001\u30cd\u30b9\u30c8\u304c\u6700\u3082\u6df1\u3044\u3068\u3053\u308d\u304b\u3089\u3001\u30e9\u30d9\u30eb\u304c\u4ed8\u3044\u305f\u30d6\u30ed\u30c3\u30af\u3092\u76f4\u63a5<span>break<\/span>\u3067\u304d\u3066\u3044\u308b\u3053\u3068\u304c\u5206\u304b\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">System.out.println(\"\u30e9\u30d9\u30eb\u4ed8\u304dfor\u6587\u306b\u5165\u308a\u307e\u3059\");\r\n\r\nLABEL1: for (int i = 0; i &lt; 2; i++) {\r\n\tSystem.out.println(\"\u4eca\u306f i = \" + i + \"\u3067\u3059\");\r\n\r\n\tLABEL2: for (int j = 0; j &lt; 2; j++) {\r\n\t\tSystem.out.println(\"  \u4eca\u306f j = \" + j + \"\u3067\u3059\");\r\n\r\n\t\tif (j == 1) {\r\n\t\t\tSystem.out.println(\"LABEL1\u3092break\u3057\u307e\u3059\");\r\n\t\t\tbreak LABEL1;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nSystem.out.println(\"\u30e9\u30d9\u30eb\u4ed8\u304dfor\u6587\u304b\u3089\u629c\u3051\u307e\u3057\u305f\");<\/pre>\n<p><strong><span class=\"f-marker-p\">\u5b9f\u884c\u7d50\u679c<\/span><\/strong><\/p>\n<pre class=\"prettyprint lang:default decode:true\">\u30e9\u30d9\u30eb\u4ed8\u304dfor\u6587\u306b\u5165\u308a\u307e\u3059\r\n\u4eca\u306f i = 0\u3067\u3059\r\n  \u4eca\u306f j = 0\u3067\u3059\r\n  \u4eca\u306f j = 1\u3067\u3059\r\nLABEL1\u3092break\u3057\u307e\u3059\r\n\u30e9\u30d9\u30eb\u4ed8\u304dfor\u6587\u304b\u3089\u629c\u3051\u307e\u3057\u305f<\/pre>\n<pre class=\"prettyprint lang:default decode:true\">System.out.println(\"\u30e9\u30d9\u30eb\u4ed8\u304dswtich\u6587\u306b\u5165\u308a\u307e\u3059\");\r\nint i = 1;\r\n\r\nLABEL1: switch (i) {\r\ncase 1:\r\n\tSystem.out.println(\"i\u306ecase 1\u3067\u3059\");\r\n\tint j = 1;\r\n\r\n\tLABEL2: switch (j) {\r\n\tcase 1:\r\n\t\tSystem.out.println(\"  j\u306ecase 1\u3067\u3059\");\r\n\t\tSystem.out.println(\"LABEL1\u3092break\u3057\u307e\u3059\");\r\n\t\tbreak LABEL1;\r\n\tcase 2:\r\n\t\tSystem.out.println(\"  j\u306ecase 2\u3067\u3059\");\r\n\t}\r\ncase 2:\r\n\tSystem.out.println(\"i\u306ecase 2\u3067\u3059\");\r\n}\r\n\r\nSystem.out.println(\"\u30e9\u30d9\u30eb\u4ed8\u304dswtich\u6587\u3092\u629c\u3051\u307e\u3057\u305f\");<\/pre>\n<p><strong><span class=\"f-marker-p\">\u5b9f\u884c\u7d50\u679c<\/span><\/strong><\/p>\n<pre class=\"prettyprint lang:default decode:true\">\u30e9\u30d9\u30eb\u4ed8\u304dswtich\u6587\u306b\u5165\u308a\u307e\u3059\r\ni\u306ecase 1\u3067\u3059\r\n  j\u306ecase 1\u3067\u3059\r\nLABEL1\u3092break\u3057\u307e\u3059\r\n\u30e9\u30d9\u30eb\u4ed8\u304dswtich\u6587\u3092\u629c\u3051\u307e\u3057\u305f<\/pre>\n<p>\u306a\u304a\u3001<span>try-finally<\/span>\u306e\u5834\u5408\u306f<span>break<\/span>\u3057\u305f\u5f8c\u306b<span>finally<\/span>\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\u4ed6\u306e\u6587\u3068\u5c11\u3057\u9055\u3044\u307e\u3059\u306e\u3067\u899a\u3048\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">System.out.println(\"\u30e9\u30d9\u30eb\u4ed8\u304dtry\u6587\u306b\u5165\u308a\u307e\u3059\");\r\nboolean doBreak = true;\r\n\r\nLABEL1: try {\r\n\tSystem.out.println(\"LABEL1\u306etry\u6587\u306b\u5165\u308a\u307e\u3057\u305f\");\r\n\r\n\tLABEL2: try {\r\n\t\tSystem.out.println(\"LABEL2\u306etry\u6587\u306b\u5165\u308a\u307e\u3057\u305f\");\r\n\r\n\t\tif (doBreak) {\r\n\t\t\tSystem.out.println(\"LABEL1\u3092break\u3057\u307e\u3059\");\r\n\t\t\tbreak LABEL1;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"LABEL2\u3067\u306ebreak\u5f8c\u3067\u3059\");\r\n\t} finally {\r\n\t\tSystem.out.println(\"LABEL2\u306efinally\u3067\u3059\");\r\n\t}\r\n\r\n\tSystem.out.println(\"LABEL1\u306e\u5f8c\u90e8\u5206\u3067\u3059\");\r\n} finally {\r\n\tSystem.out.println(\"LABEL1\u306efinally\u3067\u3059\");\r\n}\r\n\r\nSystem.out.println(\"\u30e9\u30d9\u30eb\u4ed8\u304dtry\u6587\u304c\u7d42\u308f\u308a\u307e\u3057\u305f\");<\/pre>\n<p><strong><span class=\"f-marker-p\">\u5b9f\u884c\u7d50\u679c<\/span><\/strong><\/p>\n<pre class=\"prettyprint lang:default decode:true\">\u30e9\u30d9\u30eb\u4ed8\u304dtry\u6587\u306b\u5165\u308a\u307e\u3059\r\nLABEL1\u306etry\u6587\u306b\u5165\u308a\u307e\u3057\u305f\r\n  LABEL2\u306etry\u6587\u306b\u5165\u308a\u307e\u3057\u305f\r\n  LABEL1\u3092break\u3057\u307e\u3059\r\n  LABEL2\u306efinally\u3067\u3059\r\nLABEL1\u306efinally\u3067\u3059\r\n\u30e9\u30d9\u30eb\u4ed8\u304dtry\u6587\u304c\u7d42\u308f\u308a\u307e\u3057\u305f<\/pre>\n<h3><span id=\"-break-4\">\uff12-\uff14\uff0e\u30e9\u30d9\u30eb\u3092\u4f7f\u3063\u305f<span>break<\/span>\u306f\u3069\u3046\u3044\u3046\u6642\u306b\u4f7f\u3046\u306e\u304b<\/span><\/h3>\n<p>\u30e9\u30d9\u30eb\u3092\u4f7f\u3063\u305f<span>break<\/span>\u306f\u3001\u4ee5\u4e0b\u3092\u884c\u3044\u305f\u3044\u6642\u306b\u4f7f\u3044\u307e\u3059\u3002\u7279\u306b<span>2<\/span>\u306f\u30eb\u30fc\u30d7\u306b\u9650\u3089\u305a\u4f7f\u3048\u308b\u306e\u304c\u3044\u3044\u3068\u3053\u308d\u3067\u3059\u3002<\/p>\n<ol>\n<li>\u6df1\u3044\u30cd\u30b9\u30c8\u304b\u3089\u4e00\u6c17\u306b\u8131\u51fa\u3059\u308b\u6642<\/li>\n<li>\u30d6\u30ed\u30c3\u30af\u5168\u4f53\u306e\u5b9f\u884c\u3092\u7d42\u3048\u3066\u3082\u3044\u3044\u6642<\/li>\n<\/ol>\n<p>1.\u306f\u3001\u30cd\u30b9\u30c8\u3092\u69cb\u6210\u3059\u308b\u30eb\u30fc\u30d7\u6587\u3084<span>switch<\/span>\u6587\u5168\u4f53\u3067\u3001\u30eb\u30fc\u30d7\u7d99\u7d9a\u72b6\u614b\u3092\u7ba1\u7406\u3059\u308b\u5fc5\u8981\u304c\u306a\u304f\u306a\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u30cd\u30b9\u30c8\u3057\u305f\u5168\u3066\u306e\u30d6\u30ed\u30c3\u30af\u3092\u4e00\u6c17\u306b\u8131\u51fa\u3057\u306a\u304f\u3066\u3082\u3088\u304f\u3001\u9014\u4e2d\u3067\u306e\u5fc5\u8981\u306a\u30d6\u30ed\u30c3\u30af\u3060\u3051\u306b\u3082\u3067\u304d\u308b\u306e\u3067\u3001\u67d4\u8edf\u306b\u6d3b\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>2.\u306f\u300c\u3053\u306e\u6761\u4ef6\u3092\u6e80\u305f\u305b\u3070\u30d6\u30ed\u30c3\u30af\u306e\u4e2d\u306f\u3053\u308c\u4ee5\u4e0a\u5b9f\u884c\u3057\u306a\u304f\u3066\u3082\u3044\u3044\u3001\u3067\u3082\u307e\u3060\u5f8c\u306b\u306f\u51e6\u7406\u304c\u3042\u308b\u306e\u3067\u30e1\u30bd\u30c3\u30c9\u304b\u3089\u306e<span>return<\/span>\u306f\u3067\u304d\u306a\u3044\u300d\u3068\u3044\u3046\u30b1\u30fc\u30b9\u3067\u4f7f\u3046\u3068\u52b9\u679c\u7684\u3067\u3057\u3087\u3046\u3002<span>if<\/span>\u6587\u306a\u3069\u304c\u6e1b\u3089\u305b\u308b\u306e\u3067\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u7c21\u7d20\u5316\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u30e9\u30d9\u30eb\u4ed8\u304d<span>break<\/span>\u306f\u3044\u308f\u3086\u308b<span>GOTO<\/span>\u6587\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u305a\u3063\u3068\u304a\u4f1d\u3048\u3057\u3066\u3044\u308b\u3068\u304a\u308a\u3001<span>break<\/span>\u3057\u305f\u30d6\u30ed\u30c3\u30af\u3092\u629c\u3051\u3066\u3001\u30d6\u30ed\u30c3\u30af\u306e\u6b21\u306b\u3042\u308b\u51e6\u7406\u306b\u901f\u3084\u304b\u306b\u79fb\u308b\u305f\u3081\u306e\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>GOTO\u6587\u3067\u51fa\u6765\u308b\u3088\u3046\u306a\u3001\u51e6\u7406\u3092\u3055\u304b\u306e\u307c\u3063\u3066\u306e\u30eb\u30fc\u30d7\u306a\u3069\u306f\u3001\u30e9\u30d9\u30eb\u4ed8\u304d<span>break<\/span>\u3067\u306f\u3067\u304d\u307e\u305b\u3093\u3002\u30e1\u30bd\u30c3\u30c9\u3092\u307e\u305f\u304c\u3063\u305f<span>break<\/span>\u3082\u3067\u304d\u307e\u305b\u3093\u3002\u3067\u3059\u304b\u3089\u3001<span>Java<\/span>\u3067\u306f\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u306f\u5fc5\u305a\u4e0a\u304b\u3089\u4e0b\u306b\u9806\u756a\u3069\u304a\u308a\u306b\u6d41\u308c\u308b\u306e\u3067\u3059\u3002<\/p>\n<h2><span id=\"break-2\">\uff13\uff0e\u3010\u767a\u5c55\u3011<span>break<\/span>\u306e\u3044\u308d\u3044\u308d<\/span><\/h2>\n<h3><span id=\"-Streambreak\">\uff13-\uff11\uff0eStream\u3067\u306f<span>break<\/span>\u3067\u304d\u306a\u3044<\/span><\/h3>\n<p>Java 8\u304b\u3089\u8ffd\u52a0\u3055\u308c\u305f<span>Stream API<\/span>\u306f\u30eb\u30fc\u30d7\u6587\u306b\u4f3c\u305f\u51e6\u7406\u304c\u3067\u304d\u307e\u3059\u3002\u3067\u3059\u304c\u3001\u3042\u304f\u307e\u3067\u300c\u30eb\u30fc\u30d7\u306b\u4f3c\u305f\u3082\u306e\u300d\u3067\u3042\u308a\u3001\u69cb\u6587\u4e0a\u306e\u30eb\u30fc\u30d7\u6587\u3067\u306f\u306a\u3044\u306e\u3067<span>break<\/span>\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">List&lt;String&gt; list = Arrays.asList(\"A\", \"B\", \"C\");\r\nlist.stream().forEach(s -&gt; {\r\n\tbreak; \/\/ \u2190\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc!! for\/while\u306e\u3088\u3046\u306a\u30eb\u30fc\u30d7\u6587\u306e\u4e2d\u3067\u306f\u306a\u3044\u305f\u3081\u3001break\u306f\u884c\u3048\u306a\u3044\r\n});<\/pre>\n<p>Stream\u306f\u3001\u6b63\u78ba\u306b\u8a00\u3048\u3070\u4f55\u304b\u306e\u96c6\u307e\u308a\u306b\u3042\u308b\u8981\u7d20\u4e00\u3064\u4e00\u3064\u306b\u5bfe\u3057\u3066\u51e6\u7406\u3092\u4e26\u884c\u306b\u3084\u308b\u305f\u3081\u306e\u4ed5\u7d44\u307f\u3067\u3042\u3063\u3066\u3001\u30eb\u30fc\u30d7\u7684\u306b\u4f55\u304b\u3092\u3059\u308b\u308f\u3051\u3067\u306f\u306a\u3044\u304b\u3089\u3067\u3059\u3002\u3067\u3059\u306e\u3067\u3001\u8981\u7d20\u4e00\u3064\u306b\u5bfe\u3059\u308b\u51e6\u7406\u3092<span>return<\/span>\u3067\u4e2d\u65ad\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u3059\u304c\u3001\u30eb\u30fc\u30d7\u6587\u3068\u540c\u3058\u3088\u3046\u306b<span>Stream<\/span>\u5168\u4f53\u3092\u4e2d\u65ad\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u3044\u306e\u3067\u3059\u3002<\/p>\n<p>\u3067\u3059\u306e\u3067\u3001\u30eb\u30fc\u30d7\u4e2d\u3067\u4e2d\u65ad\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u306a\u3089\u5f93\u6765\u3069\u304a\u308a<span>for\/while<\/span>\u6587\u3092\u4f7f\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u4f3c\u305f\u7d50\u679c\u3092\u5f97\u308b\u306a\u3089\u3001<span>Stream<\/span>\u4e0a\u3067\u4e0d\u8981\u306a\u30c7\u30fc\u30bf\u3092\u9664\u5916\u3059\u308b\u305f\u3081\u306b\u3001\u4e2d\u9593\u51e6\u7406\u3068\u3057\u3066<span>filter<\/span>\u3084<span>takeWhile(Java 9<\/span>\u4ee5\u964d<span>)<\/span>\u3092\u3059\u308b\u306a\u3069\u306e\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3><span id=\"-break-5\">\uff13-\uff12\uff0e\u30eb\u30fc\u30d7\u3067\u306f\u306a\u308b\u3079\u304f\u65e9\u3044\u30bf\u30a4\u30df\u30f3\u30b0\u3067<span>break<\/span>\u3059\u3079\u304d<\/span><\/h3>\n<p>\u30eb\u30fc\u30d7\u4e2d\u3067<span>break<\/span>\u3067\u304d\u308b\u306a\u3089\u3001\u306a\u308b\u3079\u304f\u65e9\u3044\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u884c\u3046\u306e\u304c\u3044\u3044\u3068\u8003\u3048\u307e\u3059\u3002<span>return<\/span>\u306b\u306f\u65e9\u671f<span>return<\/span>\u3068\u3044\u3046\u8003\u3048\u65b9\u304c\u3042\u308a\u307e\u3059\u304c\u3001<span>break<\/span>\u3084<span>continue<\/span>\u306b\u3082\u540c\u3058\u3088\u3046\u306a\u3053\u3068\u304c\u8a00\u3048\u307e\u3059\u3002<\/p>\n<p>\u30eb\u30fc\u30d7\u4e2d\u3067\u306f<span>break<\/span>\u3067\u304d\u308b\u306a\u3089\u65e9\u304f\u3084\u3063\u3066\u3057\u307e\u3048\u3070\u3001\u305d\u3053\u304b\u3089\u5f8c\u308d\u306e\u51e6\u7406\u3067\u306f<span>break<\/span>\u3059\u308b\u6761\u4ef6\u4ee5\u5916\u3067\u3042\u308b\u3068\u3044\u3046\u3053\u3068\u304c\u660e\u78ba\u306b\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u30eb\u30fc\u30d7\u6587\u306a\u3069\u306e\u5168\u4f53\u7684\u306a\u898b\u901a\u3057\u304c\u826f\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4eca\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067<span>break<\/span>\u3092\u3057\u3066\u308b\u7b87\u6240\u306f\u3001\u672c\u5f53\u306b\u305d\u3053\u3067\u884c\u308f\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u306e\u304b\u8003\u3048\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u3082\u3063\u3068\u30b7\u30f3\u30d7\u30eb\u306b\u3067\u304d\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u305f\u3060\u3001\u6700\u521d\u306b<span>break<\/span>\u3092\u3057\u305f\u3044\u304c\u305f\u3081\u306b\u81ea\u7136\u306a\u30ed\u30b8\u30c3\u30af\u3092\u637b\u3058\u66f2\u3052\u308b\u3079\u304d\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u306e\u3067\u3001\u30d0\u30e9\u30f3\u30b9\u611f\u899a\u304c\u5927\u4e8b\u3067\u3059\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">for (int i = 0; i &lt; 10; i++) {\r\n\tif (break\u3067\u304d\u308b\u6761\u4ef6) {\r\n\t\tbreak;\r\n\t}\r\n\r\n\t\/\/ \u3053\u3053\u304b\u3089\u5f8c\u308d\u306fbreak\u3067\u304d\u308b\u6761\u4ef6\u4ee5\u5916\u3060\u3068\u78ba\u5b9a\u3059\u308b\r\n}\r\n\r\nfor (int i = 0; i &lt; 10; i++) {\r\n\tif (\u4f55\u304b\u306e\u6761\u4ef61) {\r\n\t\tif (\u4f55\u304b\u306e\u6761\u4ef62) {\r\n\t\t}\r\n\t} else if (\u4f55\u304b\u306e\u6761\u4ef63) {\r\n\t\t\/\/ \u672c\u5f53\u306b\u3053\u3053\u3067\u306a\u3051\u308c\u3070break\u304c\u3067\u304d\u306a\u3044\u306e\u304b?\r\n\t\tif (break\u3067\u304d\u308b\u6761\u4ef6) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}<\/pre>\n<h2><span id=\"i-2\">\uff14\uff0e\u307e\u3068\u3081<\/span><\/h2>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f<span>break<\/span>\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u304a\u4f1d\u3048\u3057\u3066\u304d\u307e\u3057\u305f\u3002<span>break<\/span>\u306f\u30eb\u30fc\u30d7\u6587\u3084<span>switch<\/span>\u6587\u3092\u9014\u4e2d\u3067\u4e2d\u65ad\u3057\u3066\u3001\u5f8c\u7d9a\u306e\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u3042\u308b\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u5b9f\u306f<span>break<\/span>\u306f\u3001\u30e9\u30d9\u30eb\u4ed8\u304d\u30d6\u30ed\u30c3\u30af\u306e\u4e2d\u65ad\u3082\u3067\u304d\u307e\u3059\u3002\u30e9\u30d9\u30eb\u306f\u3001\u30eb\u30fc\u30d7\u6587\u3001<span>switch<\/span>\u6587\u3001<span>try<\/span>\u6587\u306a\u3069\u306e\u4ed6\u306b\u3082\u3001\u3054\u304f\u666e\u901a\u306e\u30d6\u30ed\u30c3\u30af\u306b\u3082\u4ed8\u3051\u3089\u308c\u307e\u3059\u3002\u30e9\u30d9\u30eb\u4ed8\u304d\u30d6\u30ed\u30c3\u30af\u306e<span>break<\/span>\u306f\u4e0a\u624b\u304f\u4f7f\u3048\u3070\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u3059\u308b\u52b9\u679c\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u6d3b\u7528\u3067\u304d\u305d\u3046\u304b\u8003\u3048\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Java\u306ebreak\u306f\u3001\u30eb\u30fc\u30d7\u6587\u3084switch\u6587\u3092\u3059\u3050\u306b\u7d42\u4e86\u3055\u305b\u3066\u3001\u629c\u3051\u308b\u305f\u3081\u306e\u3082\u306e\u3067\u3059\u3002\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u308b\u4e0a\u3067\u306f\u6b20\u304b\u305b\u306a\u3044\u3082\u306e\u3067\u3059\u3002 break\u306f\u3084\u3063\u3066\u3044\u308b\u3053\u3068\u305d\u306e\u3082\u306e\u306f\u5927\u5909\u30b7\u30f3\u30d7\u30eb\u3067\u3001\u3057\u304b\u3082\u30eb\u30fc\u30d7\u6587\u304c\u3042\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":804,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[14],"acf":[],"_links":{"self":[{"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/posts\/1444"}],"collection":[{"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/comments?post=1444"}],"version-history":[{"count":8,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/posts\/1444\/revisions"}],"predecessor-version":[{"id":5783,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/posts\/1444\/revisions\/5783"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/media\/804"}],"wp:attachment":[{"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/media?parent=1444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/categories?post=1444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}