【简答题】阅读程序写结果 public class TestBreak { public static void main (String args[]) { int stop = 4; for (int i = 1; i <=10; i++) { if (i==stop) { break; } System.out.println(" i=" + i); } } }
【简答题】阅读程序写结果 public class TestContinue { public static void main (String args[]) { int skip = 4; for (int i = 1; i <=10; i++) { if (i==skip) { continue; } System.out.println(" i=" + i); } } }