循环跳出--只打印 x = 0 一次;

时间:2014-01-14 19:25:50   收藏:0   阅读:714
bubuko.com,布布扣
 1     public static void main(String[] args)
 2     {
 3         System.out.println("main");
 4         w: for (int x = 0; x < 3; x++)
 5         {
 6             for (int y = 0; y < 4; y++)
 7             {
 8                 System.out.println("x=" + x);
 9                 break w;
10             }
11         }
12     }
bubuko.com,布布扣

原文:http://www.cnblogs.com/linson0116/p/3512240.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!