第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.

答案:登入後查看
統計: A(12), B(20), C(21), D(188), E(13) #1157017

詳解 (共 1 筆)

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