What is required to automatically close resources used in try-with-resources statement?
The resource must override the close method.
The resource must implement AutoCloseable.
The resource must be declared outside of try block.
The resource must implement Serializable.