阿摩線上測驗 登入

試題詳解

試卷:104年 - SCJP 151-200#99330 | 科目:OJCP(SCJP)

試卷資訊

試卷名稱:104年 - SCJP 151-200#99330

年份:104年

科目:OJCP(SCJP)

162. Given: 
11. public static void main(String[] args){ 
12. Integer i = new Integer(1) + new Integer(2);
 13. switch(i){ 
14. case 3: System.out.println("three"); break; 
15. default: System.out.println("other"); break; 
16. } 
17. } 
What is the result?
(A) three
(B) other
(C) An exception is thrown at runtime.
(D) Compilation fails because of an error on line 12.
(E) Compilation fails because of an error on line 13. 
正確答案:登入後查看