试题详情
多项选择题 1. class Super {  2. private int a;  3. protected Super(int a) { this.a = a; }  4. }  .....  11. class Sub extends Super {  12. public Sub(int a) { super(a); }  13. public Sub() { this.a= 5; }  14. }  Which two, independently, will allow Sub to compile?()

A、 Change line 2 to: public int a;

B、 Change line 2 to: protected int a;

C、 Change line 13 to: public Sub() { this(5); }

D、 Change line 13 to: public Sub() { super(5); }

E、 Change line 13 to: public Sub() { super(a); }

  • C,D
  • 关注下方微信公众号,在线模考后查看

热门试题