About Question enthuware.ocajp.i.v7.2.945 :
Posted: Sun Jul 14, 2013 4:31 pm
I answered this question correctly.
Which of the following statements are true?
Select 2 options.
a. Private methods cannot be overridden in subclasses.
b. A subclass can override any method in a non-final superclass.
c. An overriding method can declare that it throws a wider spectrum of checked exceptions than the method it is overriding.
d. The parameter list of an overriding method must be a subset of the parameter list of the method that it is overriding.
e. The overriding method may opt not to declare any throws clause even if the original method has a throws clause.
Answers: a,e
For the explanation of selection b., should the explanation also include the following?
Should the following statement be part of the explanation for b) ?
Explanation: Methods that are not private and not final can be overridden.
Which of the following statements are true?
Select 2 options.
a. Private methods cannot be overridden in subclasses.
b. A subclass can override any method in a non-final superclass.
c. An overriding method can declare that it throws a wider spectrum of checked exceptions than the method it is overriding.
d. The parameter list of an overriding method must be a subset of the parameter list of the method that it is overriding.
e. The overriding method may opt not to declare any throws clause even if the original method has a throws clause.
Answers: a,e
For the explanation of selection b., should the explanation also include the following?
Should the following statement be part of the explanation for b) ?
Explanation: Methods that are not private and not final can be overridden.