About Question enthuware.ocajp.i.v8.2.1438 :
Moderator: admin
-
- Posts: 9
- Joined: Tue Feb 28, 2017 2:13 am
- Contact:
About Question enthuware.ocajp.i.v8.2.1438 :
Hi again,
If I insert the line: "return value;" at the end of try and catch blocks, then the line "System.out.print(global+" "+value+" ");" will be unreachable statement. Can you explain me why? Thx.
If I insert the line: "return value;" at the end of try and catch blocks, then the line "System.out.print(global+" "+value+" ");" will be unreachable statement. Can you explain me why? Thx.
-
- Site Admin
- Posts: 10170
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v8.2.1438 :
I am not sure I understand your question but if you move the print statement after return, how do you think this line will execute after the method has already returned?
Paul.
Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 9
- Joined: Tue Feb 28, 2017 2:13 am
- Contact:
Re: About Question enthuware.ocajp.i.v8.2.1438 :
You are right, it was very simple, I had a memory leak .
Thx.
Thx.
-
- Posts: 1
- Joined: Fri Jan 19, 2018 7:05 am
- Contact:
Re: About Question enthuware.ocajp.i.v8.2.1438 :
Please could you explain how 111 333 333 is the correct because I was thinking it should be 111 333 ?
-
- Site Admin
- Posts: 10170
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v8.2.1438 :
There are two println statements in the code. Two values are printed by the first one System.out.print(global+" "+value+" "); and one value is printed by the second one - System.out.print(ct.parse("333"));
If you like our products and services, please help us by posting your review here.
-
- Posts: 30
- Joined: Sun Feb 18, 2024 7:21 pm
- Contact:
Re: About Question enthuware.ocajp.i.v8.2.1438 :
I too picked "111 333".
Why not add this as an option to make the question more tricky?
-
- Site Admin
- Posts: 10170
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v8.2.1438 :
Updated.
thank you for your feedback!
thank you for your feedback!
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 4 guests