Which of the following statements are true?
Select 2 options
Correct Options are : A E
A. is a correct answer.
Only methods that are inherited can be overridden and private methods are not inherited.
B. is wrong.
Only the methods that are not declared to be final can be overridden.
private methods are not inherited so they cannot be overridden either.
C. and D. are wrong.
An overriding method must have the same parameters.
E. is a correct answer.
Empty set of exceptions is a valid subset of the set of exceptions thrown by the original method so an overriding method can choose to not have any throws clause.
A method can be overridden by defining a method with the same signature(name and parameter list) and return type as the method in a superclass.
The return type can be a subclass of the original method's return type.
Only methods that are accessible can be overridden.
A final method cannot be overridden.
An overriding method cannot exhibit behavior that contradicts the declaration of the original method.
A subclass may have a static method with the same signature as a static method in the base class but it is not called overriding.