1. public class X {
2. public X aMethod() { return this;}
3. }
1. public class Y extends X {
2.
3. }
Which two methods can be added to the definition of class Y? (Choose two)
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(); }
Ans - C,E
Hello ranchers i am not able to get this question . I think ans should be A,B.
Can some one expalin me
Source "whizlabs"
