Page 1 of 1

About Question enthuware.ocpjp.v7.2.1208 :

Posted: Thu Jul 25, 2013 11:37 am
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.

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

Posted: Thu Jul 25, 2013 6:32 pm
by admin
Sure, that's a good point. This has now been updated. Thank you for your feedback!
-Paul.