阿摩線上測驗 登入

試題詳解

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

試卷資訊

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

年份:104年

科目:OJCP(SCJP)

第13題 Given: 1. public class Barn{ 2. public static void main(String[] args){ private void bar(int x){} public void bar(int x){} public int bar(String x){return 1;} public Alpha bar(int x){} public void bar(int x, int y){} public int bar(int x){return x;} Methods SCJP 6.0 認證教戰手冊 黃彬華著 碁峰出版 7 3. new Barn.go("hi", 1); 4. new Barn.go("hi", "world", 2); 5. } 6. public void go(String... y, int x){ 7. System.out.print(y[y.length-1] + " "); 8. } 9. } What is the result?
(A) hi hi
(B) hi world
(C) world world
(D) Compilation fails.
(E) An exception is thrown at runtime.
正確答案:登入後查看

詳解 (共 1 筆)

推薦的詳解#2782938
未解鎖
這題有兩個錯誤的地方,都會造成編譯錯誤,...
(共 430 字,隱藏中)
前往觀看
12
0