Exam 1z0-809 All QuestionsBrowse all questions from this exam
Question 133

Given that these files exist and are accessible:

and given the code fragment:

Which code fragment can be inserted at line n1 to enable the code to print only /company/emp?

    Correct Answer: A

    To print only '/company/emp', the code should list the contents of the '/company' directory to identify its subdirectories and files. Using 'Files.list(Paths.get("/company"))' provides this functionality, as it will return a stream of the paths of files and directories under '/company'.

Discussion
jduarteOption: A

The answer is A

iSnoverOption: A

The answer is A, B is incorrect.

Kim514Option: A

The answer is A B is incorrect

NoraYuOption: B

B is correct

AVB22Option: A

a, tested