返回列表 發帖
  1. public class Ch01
  2. {
  3.     public static void main(String args[])
  4.     {
  5.         System.out.println("break用法");
  6.         for(int i=1; i<=10; i++)
  7.         {
  8.             if(i==5)
  9.                 break;
  10.             System.out.println(i);
  11.         }
  12.         System.out.println("不加break");
  13.         for(int i=1; i<=10; i++)
  14.         {
  15.             System.out.println(i);
  16.         }
  17.     }
  18. }
複製代碼

TOP

返回列表