Which statements about try-with-resources are true? (Choose two.) A. Any resource used must implement Closeable. B. If
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 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.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
OCP Oracle Certified Professional Java SE 11 Developer Practice Tests Exam 1Z0 819 And Upgrade Exam 1Z0 817
ISBN: 9781119696131
1st Edition
Authors: Scott Selikoff, Jeanne Boyarsky
Question Posted: