【简答题】阅读程序写结果 public class Person { String name; int age; public Person(String name, int age) { this.name = name; this.age = age; } public static void main(String[] args) { Person c = new Person("Peter", 17...
【简答题】阅读程序写结果 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); } } }
【简答题】阅读程序写结果 public class TestSwitch { public static void main(String[] args) { char ch = 'a'; switch(ch) { case 'a': case 'A': System.out.println('A'); break; case 'B': System.out.println('B'); break; def...