Question OOP-EXC-0013
MediumWhat does try-with-resources do in Java?
- A.
Allocates more memory
- B.
Automatically closes resources such as files when the try block ends
- 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
What does try-with-resources do in Java?
Allocates more memory
Automatically closes resources such as files when the try block ends
Sign up free to see the answer and a step-by-step explanation.
Retries the block on failure
Catches every exception silently