Skip to content

Glossary: Software Design Patterns in Java

AutoCloseable

Also written: close()

A Java interface for objects that have a `close()` method. try-with-resources calls it automatically when its block ends.

Where the book teaches it

Related terms

Try-with-resourcesTemplate method