2009年2月11日 星期三

第82題

Given:
11. public interface A111{
12. String s = "yo";
13. public void method1();
14. }
17. interface B{}
20. interface C extends A111, B{
21. public 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.
答案:A
參考:7-6 介面
-------------------------------------------------------
20. interface C extends A111, B{ //介面c要繼承二介面是合法的

沒有留言:

張貼留言