阿摩線上測驗 登入

試題詳解

試卷:104年 - SCJP 1-50#41416 | 科目:OJCP(SCJP)

試卷資訊

試卷名稱:104年 - SCJP 1-50#41416

年份:104年

科目:OJCP(SCJP)

第41題 Given: 1. public class KungFu{ 2. public static void main(String[] args){ 3. Integer x = 400; 4. Integer y = x; 5. x++; 6. StringBuilder sb1 = new StringBuilder("123"); 7. StringBuilder sb2 = sb1; 8. sb1.append("5"); 9. System.out.println((x == y) + " " + (sb1 == sb2)); 10. } 11. } What is the result? SCJP 6.0 認證教戰手冊 黃彬華著 碁峰出版 22
(A) true true
(B) false true
(C) true false
(D) false false
(E) Compilation fails. F. An exception is thrown at runtime.
正確答案:登入後查看