About Question enthuware.ocpjp.v8.2.1128 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
johnlong
Posts: 197
Joined: Mon Jun 20, 2016 5:06 pm
Contact:

About Question enthuware.ocpjp.v8.2.1128 :

Post by johnlong »

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.

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v8.2.1128 :

Post by admin »

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.

johnlong
Posts: 197
Joined: Mon Jun 20, 2016 5:06 pm
Contact:

Re: About Question enthuware.ocpjp.v8.2.1128 :

Post by johnlong »

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.

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v8.2.1128 :

Post by admin »

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.

johnlong
Posts: 197
Joined: Mon Jun 20, 2016 5:06 pm
Contact:

Re: About Question enthuware.ocpjp.v8.2.1128 :

Post by johnlong »

I reckon question has to be rephrased :
Overriding method cannot throw AN exception that is not thrown by overridden method.

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v8.2.1128 :

Post by admin »

Yes, this is false as well but a lot easier to guess. Will update.
thank you for your feedback!

johnlong
Posts: 197
Joined: Mon Jun 20, 2016 5:06 pm
Contact:

Re: About Question enthuware.ocpjp.v8.2.1128 :

Post by johnlong »

Thank you!

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 6 guests