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