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.
About Question enthuware.ocajp.i.v8.2.1438 :
Moderator: admin
-
- Posts: 9
- Joined: Tue Feb 28, 2017 2:13 am
- Contact:
-
- Site Admin
- Posts: 10398
- 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.
-
- 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: 10398
- 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"));
Who is online
Users browsing this forum: No registered users and 8 guests