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

Given:

Assume the file on path does not exist.

What is the result?

    Correct Answer: B

    The presented code utilizes the Java NIO API to delete a file if it exists. The method Files.deleteIfExists(Path) returns true if the file was deleted by this method; false if the file could not be deleted because it did not exist. Given that the file does not exist, the method will return false, and the program will output '/u01/work/filestore.txt is not deleted.'

Discussion
Sa16253748596Option: B

B is true.