Which are true about closing resources to guard against a denial of service attack? (Choose two.) A.
Question:
Which are true about closing resources to guard against a denial of service attack? (Choose two.)
A. The NIO.2 Files.lines() method does not require closing a resource when it is used in a stream pipeline.
B. The NIO.2 Files.lines() method requires closing a resource when it is used in a stream pipeline.
C. When locking a resource using an instance of the concurrent Lock interface, the unlock()
statement should be immediately before the finally block.
D. When locking a resource using an instance of the concurrent Lock interface, the unlock()
statement should be in a finally block.
E. When locking a resource using an instance of the concurrent Lock interface, the unlock()
statement should be immediately after the finally block.
Step by Step Answer:
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