阿摩線上測驗 登入

試題詳解

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

試卷資訊

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

年份:104年

科目:OJCP(SCJP)

第8題 Given: 1. public class Spock{ 2. public static void main(String[] args){ 3. Long tail = 2000L; 4. Long distance = 1999L; 5. Long story = 1000L; 6. if((tail>distance) ^ ((story*2)==tail)) 7. System.out.print("1"); 8. if((distance+1 != tail) ^ ((story*2)==distance)) 9. System.out.print("2"); 10. } 11. } What is the result?
(A) 1
(B) 2
(C) 12
(D) Compilation fails.
(E) No output is produced. F. An exception is thrown at runtime.
正確答案:登入後查看

詳解 (共 1 筆)

推薦的詳解#1652769
未解鎖
Jiao 幼稚園下 (2017/03...

(共 143 字,隱藏中)
前往觀看
10
0