I have heard of exception handling with try-catch but this try-with-resources needs an explanation to me. 👋 Hello, my fellow Java developers, can we discuss this together. What is a try-with-resources statement and what is it useful for?
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (3)
It's 2025, don't we live in a world with ChatGPT, Stack Overflow, Google Search that can answer such basic Java question?
That's why I said discussion
I know it's a discussion but try-with-resources is quite a basic code-level feature in Java for many years. A lot of information is available online. From the description it just seems that you didn't even bother doing a google search. That's why I commented.