移动端

  • 题王微信公众号

    题王微信公众号

    微信搜“题王网”真题密题、最新资讯、考试攻略、轻松拿下考试

单选题

10. interface A { void x(); }  11. class B implements A { public void x() { } public voidy() { } }  12. class C extends B { public void x() {} }  And:  20. java.util.List list = new java.util.ArrayList();  21. list.add(new B());  22. list.add(new C());  23. for (A a:list) {  24. a.x();  25. a.y();;  26. }  What is the result?() 

发布日期:2021-10-12

10. interface A { void x(); }  11. class B impleme...
A

The code runs with no output.

B

An exception is thrown at runtime.

C

Compilation fails because of an error in line 20.

D

Compilation fails because of an error in line 21.

E

Compilation fails because of an error in line 23.

F

Compilation fails because of an error in line 25.

标签: "暂无标签"

题王网让考试变得更简单

扫码关注题王,更多免费功能准备上线!

此试题出现在

Java认证考试

SCJP程序员认证考试

去刷题