多做题,通过考试没问题!

Java认证考试

睦霖题库>其他计算机考试>Java认证考试

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
答案解析:
进入题库查看解析

微信扫一扫手机做题