移动端

  • 题王微信公众号

    题王微信公众号

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

单选题

1. class Alpha { void m1() {} }   2. class Beta extends Alpha { void m2() { } }   3. class Gamma extends Beta { }   4.   5. class GreekTest {   6. public static void main(String [] args) {   7. a Alpha [] a = {new Alpha(), new Beta(), new Gamma() };   8. for(Alpha a2 : a) {   9. a2.m1();   10. if (a2 instanceof Beta || a2 instanceof Gamma)   11. //insert code here   12. }   13. }   14. }   哪一行代码插入到第11行,将编译但是会在运行时产生异常?()  

发布日期:2020-04-10

1. class Alpha { void m1() {} }   2. class Beta ex...
A

a2.m2();

B

((Beta)a2).m2();

C

((Alpha)a2).m2();

D

((Gamma)a2).m2();

标签: class alpha void class beta

题王网让考试变得更简单

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

此试题出现在

CMS专题

CMS专题

去刷题
热门试题热门资讯 相关试题

You are a network administrator for ExamSheet.net's Windows 2000 network.  The purchasing department has recently purchased 10 new computers. Each computer has a fax modem. You create an NTFS volume and install Windows 2000 Professional on the computers. You then install the Fax service with the default values and settings. Users report that when they attempt to fax a document by using the fax printer that is installed, the document does not fax. You want users to be able to fax documents.  What should you do?()

交感性眼炎由下列哪一因素引起的(  )。

对放射线高度敏感的恶性肿瘤是(  )。

骨折功能复位的标准错误的是()

2019年1月1日,甲公司对乙公司进行股权投资,占乙公司有表决权股份的60%,能够控制乙公司。2019年7月1日,甲公司从乙公司购人一批存货,该批存货成本为90万元(未计提减值准备),售价为110万元。至年末甲公司对外出售80%。乙公司按购买日公允价值持续计算的2019年度净利润为1300万元。甲乙公司当年未发生其他内部交易。不考虑其他相关因素,则乙公司净利润中归属于甲公司的净利润为()万元。

《绿色建筑评价标准》GB/T50378-2014,规定公共建筑地下建筑面积与总用地面积之比达到()才能得分。

教师如何处理与同事之间的关系?

交通广告

依据车船税的申报规定,下列表述正确的有()。

下列说法不正确的是(  )。

暂无相关推荐~