Question: Which statements about try-with-resources are true? (Choose two.) A. Any resource used must implement Closeable. B. If more than one resource is used, then the

Which statements about try-with-resources are true? (Choose two.)

A. Any resource used must implement Closeable.

B. If more than one resource is used, then the order in which they are closed is the reverse of the order in which they were created.

C. If the try block and close() method both throw an exception, the one thrown by the try block is suppressed.

D. Neither a catch nor a finally block is required.

E. The close() method of the resources must throw a checked exception.

Step by Step Solution

3.48 Rating (165 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The trywithresources statement is a try statement that declares one or more resources A resource is ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Oracle Questions!