About Question enthuware.ocajp.i.v8.2.1438 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
Mihai1977
Posts: 9
Joined: Tue Feb 28, 2017 2:13 am
Contact:

About Question enthuware.ocajp.i.v8.2.1438 :

Post 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.

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocajp.i.v8.2.1438 :

Post 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.
If you like our products and services, please help us by posting your review here.

Mihai1977
Posts: 9
Joined: Tue Feb 28, 2017 2:13 am
Contact:

Re: About Question enthuware.ocajp.i.v8.2.1438 :

Post by Mihai1977 »

You are right, it was very simple, I had a memory leak :).
Thx.

megavak
Posts: 1
Joined: Fri Jan 19, 2018 7:05 am
Contact:

Re: About Question enthuware.ocajp.i.v8.2.1438 :

Post by megavak »

Please could you explain how 111 333 333 is the correct because I was thinking it should be 111 333 ?

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocajp.i.v8.2.1438 :

Post 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"));
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests