About Question enthuware.ocajp.i.v7.2.1358 :
Moderator: admin
-
- Site Admin
- Posts: 10065
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1358 :
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.
-
- Posts: 22
- Joined: Sat Jun 30, 2018 6:11 am
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1358 :
Hello. The correct answer is :
"It will throw AssertionError ."
What is it mean " out of the main method "?
"It will throw AssertionError ."
What is it mean " out of the main method "?
-
- Site Admin
- Posts: 10065
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1358 :
"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.
Who is online
Users browsing this forum: Bing [Bot] and 98 guests