About Question enthuware.ocpjp.v17.2.3661:

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

Moderator: admin

Post Reply
byronvoyle
Posts: 1
Joined: Sun Nov 24, 2024 9:44 pm
Contact:

About Question enthuware.ocpjp.v17.2.3661:

Post by byronvoyle »

Hello, since try-with-resources should not have a finally block. So it will end with a compilation error right? Thanks.

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

Re: About Question enthuware.ocpjp.v17.2.3661:

Post by admin »

A a try-with-resources can certainly have a finally block. Where did you read that it should not have a finally block?
Try writing a simple program to test it out.
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 9 guests