Question OOP-EXC-0055
MediumWhich is the right place to release a file handle so it happens whether or not an exception occurs?
- A.
Only the catch block
- B.
Only the try block
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Exception Handling question
Which is the right place to release a file handle so it happens whether or not an exception occurs?
Only the catch block
Only the try block
Sign up free to see the answer and a step-by-step explanation.
A finally block, or try-with-resources / with
After the method returns