您当前的位置: 首页 >  星拱北辰 Java

【面向对象】面向对象程序设计测试题5-Java中的对象交互测试题

星拱北辰 发布时间:2019-11-29 16:12:16 ,浏览量:1

Test5:Java中的对象交互测试题

问题 1
Look the inheritance relation:
In a source of java have the following line:

woman w = new man();

What statement are corrected?
A. The expresion is legal
B. Compile corrected but running wrong
C.Will construct a woman’s object
D. the expression is illegal
答案:
D

问题 2
请阅读以下代码,请选择输出正确的结果:

class Person{
   
    private String
关注
打赏
查看更多评论

星拱北辰

暂无认证

  • 1浏览

    0关注

    1198博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录