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