About Question enthuware.ocajp.i.v7.2.1358 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
admin
Site Admin
Posts: 10065
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1358 :

Post by admin »

Correct. The call to methodX(); in main throws an AssertionError, which cannot be caught by catch(Exception ). So the main method cannot continue after the call to methodX();
If you like our products and services, please help us by posting your review here.

st.lisker
Posts: 22
Joined: Sat Jun 30, 2018 6:11 am
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1358 :

Post by st.lisker »

Hello. The correct answer is :
"It will throw AssertionError ."
What is it mean " out of the main method "?

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

Re: About Question enthuware.ocajp.i.v7.2.1358 :

Post by admin »

"out of the method" just means that whoever calls the method will receive the exception. To make it clear that the exception generated inside the method body isn't handled inside the method itself and is therefore not thrown outside the method.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

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