Exam 1z0-816 All QuestionsBrowse all questions from this exam
Question 30

Given:

When run and all three files exist, what is the state of each reader on Line 1?

    Correct Answer: B

    In the given code snippet, the 'try-with-resources' statement is used to open instances of the FileReader for three files. The 'try-with-resources' statement ensures that each resource is closed at the end of the statement, regardless of whether an exception occurs. Therefore, by the time execution reaches Line 1, all three readers have been closed.

Discussion
Sa16253748596Option: B

B is true