欢迎来到求知题库网 求知题库官网
logo
全部科目 > Java认证考试 > SCJP程序员认证考试

单项选择题

1. public class GoTest { 
2. public static void main(String[] args) { 
3. Sente a = new Sente(); a.go(); 
4. Goban b = new Goban(); b.go(); 
5. Stone c = new Stone(); c.go(); 
6. } 
7. }
8. 
9. class Sente implements Go { 
10. public void go() { System.out.println(”go in Sente.”); } 
11. } 
12. 
13. class Goban extends Sente { 
14. public void go() { System.out.println(”go in Goban”); } 
15. } 
16. 
17. class Stone extends Goban implements Go { } 
18. 
19. interface Go { public void go(); } 
What is the result?() 

    A. go in Goban     go in Sente go in Sente
    B. go in Sente      go in Sente go in Goban
    C. go in Sente     go in Goban go in Goban
    D. go in Goban    go in Goban go in Sente
    E. Compilation fails because of an error in line 17.

点击查看答案&解析

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题