Given: Which two classes correctly override the getDepth method?
A.
public class deep extends Deeper { protected Integer getDepth(){ return 5; }}
B.
public class deep extends Deeper { public Double getDepth() { return 5d; }}
C.
public class deep extends Deeper { public String getDepth () { }}
D.
public class deep extends Deeper { public Long getDepth (int d) { return 5L; }}
E.
public class deep extends Deeper { public Short getDepth () { return 5; }}
Marked answer A is wrong
B is correct instead
be
B,E
A. False: protected: Cannot reduce the visibility of the inherited method from Deeper
B. True : Double
C. False: String: The return type is incompatible with Deeper.getDepth()
D. False: (int d): It’s not the override, but overload.
E. True : Short