What is the alternative of using finally to close resource?
(a) catch block
(b) autocloseable interface to be implemented
(c) try block
(d) throw Exception
I have been asked this question in my homework.
I'd like to ask this question from AutoCloseable, Closeable and Flushable Interfaces topic in division Session Management, JSP & API of Java