SCJP題庫第082題

11. public interface A111{
12.   String s = "yo";
13.   public void method1();
14. }
17. interface B{}
20. interface C extends A111, B{
21.   ublic void method1();
22.   public void method1(int x);
23. }
What is the result?


A. Compilation succeeds.
B. Compilation fails due to multiple errors.
C. Compilation fails due to an error only on line 20.
D. Compilation fails due to an error only on line 21.
E. Compilation fails due to an error only on line 22.
F. Compilation fails due to an error only on line 12.
 
Ans: A
 
解說:
介面繼承介面(可多重)

Comments

Popular posts from this blog

Android+Google Map API v3 Geocoding(地址轉經緯度度