About Question com.enthuware.ets.scjp.v6.2.506 :
Moderator: admin
-
- Posts: 4
- Joined: Thu Jul 10, 2014 12:03 am
- Contact:
About Question com.enthuware.ets.scjp.v6.2.506 :
Even if we remove the unreachable return at the end of the function, in try and catch sections we have a "return". Why the function does not return even before running the finally?
-
- Site Admin
- Posts: 10382
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question com.enthuware.ets.scjp.v6.2.506 :
I am not sure I understand your question. As the explanation says, if you remove the return at the end, options 1, 2, and 3, are correct. Finally is always run (except when you have System.exit()) because that is how the language is designed.
-
- Posts: 21
- Joined: Sat Sep 01, 2018 10:53 am
- Contact:
Re: About Question com.enthuware.ets.scjp.v6.2.506 :
enthuware.ocpjp.v21.2.984
The code snippet in this question is not properly formatted — indentation is missing, which makes it difficult to read
The code snippet in this question is not properly formatted — indentation is missing, which makes it difficult to read
-
- Site Admin
- Posts: 10382
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question com.enthuware.ets.scjp.v6.2.506 :
Right. Fixed.
thank you for your feedback!
thank you for your feedback!
Who is online
Users browsing this forum: Bing [Bot] and 99 guests