Page 1 of 1
About Question enthuware.ocajp.i.v8.2.1438 :
Posted: Fri Mar 10, 2017 1:01 am
by Mihai1977
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.
Re: About Question enthuware.ocajp.i.v8.2.1438 :
Posted: Fri Mar 10, 2017 6:34 am
by admin
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.
Re: About Question enthuware.ocajp.i.v8.2.1438 :
Posted: Sat Mar 11, 2017 3:47 am
by Mihai1977
You are right, it was very simple, I had a memory leak

.
Thx.
Re: About Question enthuware.ocajp.i.v8.2.1438 :
Posted: Fri Jan 19, 2018 7:29 am
by megavak
Please could you explain how 111 333 333 is the correct because I was thinking it should be 111 333 ?
Re: About Question enthuware.ocajp.i.v8.2.1438 :
Posted: Fri Jan 19, 2018 12:05 pm
by admin
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"));