src/share/classes/java/lang/AutoCloseable.java

Print this page

        

*** 29,38 **** --- 29,39 ---- * A resource that must be closed when it is no longer needed. * * @author Josh Bloch * @since 1.7 */ + @FunctionalInterface public interface AutoCloseable { /** * Closes this resource, relinquishing any underlying resources. * This method is invoked automatically on objects managed by the * {@code try}-with-resources statement.