About Question enthuware.ocpjp.v8.2.1128 :
Moderators: Site Manager, fjwalraven
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
About Question enthuware.ocpjp.v8.2.1128 :
Questions says : Overriding method cannot throw ANY exception that are not thrown by overridden method.
If we say ANY, that means that its ANY exception, without any conditions.
However answer says: It can throw any exception as long as it is a subclass of any of the exceptions thrown by the overridden method.
ANY and "as long as" (conditionally) - is not the same.
If we say ANY, that means that its ANY exception, without any conditions.
However answer says: It can throw any exception as long as it is a subclass of any of the exceptions thrown by the overridden method.
ANY and "as long as" (conditionally) - is not the same.
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v8.2.1128 :
This is a True/False type question and the answer is False for exactly the same reason you mentioned. It is not a true statement. The explanation explains why it is not a true statement.
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
Re: About Question enthuware.ocpjp.v8.2.1128 :
But then it means that :
Question : Overriding method CANNOT throw ANY exception that are not thrown by overridden method.
Answer : False, overriding method CAN throw ANY exception that are not thrown by overridden method.
Question : Overriding method CANNOT throw ANY exception that are not thrown by overridden method.
Answer : False, overriding method CAN throw ANY exception that are not thrown by overridden method.
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v8.2.1128 :
I see your point but I think you are reading too much into this. The given statement is not true, that is for sure. Whether the opposite of it is true or not is not part of the question.
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
Re: About Question enthuware.ocpjp.v8.2.1128 :
I reckon question has to be rephrased :
Overriding method cannot throw AN exception that is not thrown by overridden method.
Overriding method cannot throw AN exception that is not thrown by overridden method.
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v8.2.1128 :
Yes, this is false as well but a lot easier to guess. Will update.
thank you for your feedback!
thank you for your feedback!
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
Who is online
Users browsing this forum: No registered users and 2 guests