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.
About Question enthuware.ocajp.i.v7.2.945 :
Moderators: Site Manager, fjwalraven
-
- Posts: 77
- Joined: Sun Jun 30, 2013 10:04 pm
- Contact:
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.945 :
Yes, this is already mentioned in the comments for option 1. This has now been added to option 2 as well.
thank you for your feedback!
thank you for your feedback!
Who is online
Users browsing this forum: No registered users and 3 guests