About Question enthuware.ocpjp.v7.2.1208 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
nickeasyuptech
Posts: 29
Joined: Sat Jun 08, 2013 11:33 pm
Contact:

About Question enthuware.ocpjp.v7.2.1208 :

Post by nickeasyuptech »

Hi,

I don't see a 'finally' block and I don't see how the correct answer prints 'Device Closed before Got Exception.' since the correct answer is shown as -

Device Opened
Device closed

Please advise, thank you!

Correction - I hit 'next' and then 'previous' and it now shows the answer like it should -

Device Opened
Device closed
Got Exception

Just thought I would report that since it seems to be a bug in the software.

I still don't see a 'finally' block. It appears that there isn't one and that you are just teaching that both 'catch' and finally' execute after resources in a try-with-resources is closed. If that is the case, I suggest changing the explanation from 'The catch and finally blocks are executed after the resource opened in try-with-resources is closed.' to 'Catch and finally blocks are executed after a resource opened in a try-with-resources is closed.'. Removing 'the' from the phrase helps avoid confusion since 'the' suggests that both blocks exist in the question's code.

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

Re: About Question enthuware.ocpjp.v7.2.1208 :

Post by admin »

Sure, that's a good point. This has now been updated. Thank you for your feedback!
-Paul.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests