单项选择题

switch (x) {case 1: System.out.println(1) ;case 2:case 3: System.out.println(3) ;Case 4: System.out.println(4) ;} 上面程序段,当x=2 时,运行结果是________。( )

A. 没有输出任何结果

B. 输出结果为3

C. 输出结果是3 和4

D. 输出结果是l 、3 和4

题目列表

你可能感兴趣的试题

单项选择题


A、正确
B、错误

微信扫码免费搜题