int i = 1,j = -1; switch (i) { case 0, 1:j = 1; case 2: j = 2; default; j = 0; } System.out.println(“j=”+j); What is the result?()
- A、 j = -1
- B、 j = 0
- C、 j = 1
- D、 j = 2
- E、 Compilation fails.
正确答案:E
答案解析:有

微信扫一扫手机做题
int i = 1,j = -1; switch (i) { case 0, 1:j = 1; case 2: j = 2; default; j = 0; } System.out.println(“j=”+j); What is the result?()
微信扫一扫手机做题