List of questions
Related questions
Question 40 - 312-96 discussion
James is a Java developer working INFR INC. He has written Java code to open a file, read it line by line and display its content in the text editor. He wants to ensure that any unhandled exception raised by the code should automatically close the opened file stream. Which of the following exception handling block should he use for the above purpose?
A.
Try-Catch-Finally block
B.
Try-Catch block
C.
Try-With-Resources block
D.
Try-Catch-Resources block
Your answer:
0 comments
Sorted by
Leave a comment first