• 2022-05-31
    如下代码:public class X {public X aMethod() { return this;}}public class Y extends X { }哪两个方法能加到Y类的定义中?
    A: public void aMethod(String s) {}
    B: public void aMethod() {}
    C: private Y aMethod() { return null; }
    D: public X aMethod() { return new Y(); }
    E: private void aMethod() {}