About Question enthuware.ocpjp.v17.2.3661:
Moderator: admin
-
- Posts: 1
- Joined: Sun Nov 24, 2024 9:44 pm
- Contact:
About Question enthuware.ocpjp.v17.2.3661:
Hello, since try-with-resources should not have a finally block. So it will end with a compilation error right? Thanks.
-
- Site Admin
- Posts: 10326
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v17.2.3661:
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.
Try writing a simple program to test it out.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 9 guests