About Question enthuware.ocajp.i.v8.2.866 :

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
abutalib
Posts: 12
Joined: Wed Aug 08, 2018 2:56 am
Contact:

About Question enthuware.ocajp.i.v8.2.866 :

Post by abutalib »

The question is: What can be the type of a catch argument ?

I answered:

- Any class that extends java.lang.Exception (Wronged)
- Any class that is-a Throwable (Corrected)

How is it that the catch argument type cannot be java.lang.Excetpion?

Is it not the same as: catch(Exception e){}?

Thanks

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

Re: About Question enthuware.ocajp.i.v8.2.866 :

Post by admin »

catch(Exception e) is certainly correct but you need to select one option and catch(Throwable e) is what should be selected as the correct option because remember that Exception extends Throwable and therefore, catch(Throwable t) includes catch(Exception e).
If you like our products and services, please help us by posting your review here.

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

Re: About Question enthuware.ocajp.i.v8.2.866 :

Post by admin »

catch(Exception e) is certainly correct but you need to select one option and catch(Throwable e) is what should be selected as the correct option because remember that Exception extends Throwable and therefore, catch(Throwable t) includes catch(Exception e).
If you like our products and services, please help us by posting your review here.

ivanzi
Posts: 1
Joined: Sat Sep 22, 2018 7:11 am
Contact:

Re: About Question enthuware.ocajp.i.v8.2.866 :

Post by ivanzi »

Please, recheck. Still seems like this question is invalid as it states "Select all correct options" and both answers ARE correct

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

Re: About Question enthuware.ocajp.i.v8.2.866 :

Post by admin »

You seem to be running a custom test with "Show number of correct options" disabled. I have updated the question to make it clear the best option has to be selected.

thank you for your feedback!
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests