public class BreaklFor { public static void main(String args[]){ OK: //設置一個標記 使用帶此標記的break語句跳出多重循環體 for(int i=1;i<100;i++){ //讓i循環99次 for(int j=1;j<=i;j++){ if(i==10){ break OK ; } System.out.print(i + "*" + j + "=" + i*j) ; System.out.print(" ") ; } System.out.println() ; } } }
