public class X { public X aMethod() { return this;} } public class Y extends X { } Which two methods can be added to the definition of class Y?()
- A、 public void aMethod() {}
- B、 private void aMethod() {}
- C、 public void aMethod(String s) {}
- D、 private Y aMethod() { return null; }
- E、 public X aMethod() { return new Y(); }
正确答案:C,E
答案解析:有

微信扫一扫手机做题