题目内容:
4. 以下程序执行后输出结果是( )。 public class test { public static void main(String[ ] args) { int i; for(i=1;i<5;i++) switch(i) { case 1:System.out.print(“first-”); case 2:System.out.print(“second-”); break; default:System.out.print(“others-”); } } }(本题2.0分)A、 first-second-others-second-others-others-others
B、 first-second-others- others-
C、 first-second- second- others-others-
D、 first-second- second-others-
参考答案: