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
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 Solution
3.38 Rating (167 Votes )
There are 3 Steps involved in it
The correct answers are B The NIO2 Fileslines method requires closing a resource when it is used in ... View full answer
Get step-by-step solutions from verified subject matter experts
