Java 代码分析:带标签的循环嵌套与输出结果
public class Main { public static void main(String[] args) { int i=0; LOOP: while (i<11) { i++; System.out.println(i); while (i<12) { if ( i>10 ) break LOOP; i++; } System.out.println(i); if ( i>10 ) break; } } }
1 2 3 4 5 6 7 8 9 10
原文地址: https://www.cveoy.top/t/topic/bwAE 著作权归作者所有。请勿转载和采集!