下面的代码有没有问题? class Ellipse { private double radiusA; private double radiusB; public Ellipse(double a, double b) { radiusA = a; radiusB = b; } } class Circle extends Ellipse { }
A.
没有问题
B.
运行时创建 Circle 类型的对象出错,因为没定义构造函数
C.
编译错误,因为 Circle 类没有定义构造函数
D.
编译错误, Circle 类的缺省构造函数需要调用 Ellipse 的却省构造函数,参数不匹配
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【单选题】The teacher_____expects his students to pass the university entrance examination.
【单选题】Friends become a child's chosen family. If his social life is going well, he gains confidence. If he has trouble connecting, it hurts and can make him feel sad and withdrawn and lonely. 1. Help your c...