In the try-with-resources statement, if an exception is thrown, what happens to the resources declared within the try?
They must be manually closed in the catch block.
They are automatically closed.
The program terminates without closing them.
They remain open.