About Question enthuware.ocpjp.v17.2.1798 :
Posted: Sat Oct 28, 2023 12:20 am
For the explanation of the 3rd options:
I think the second sentence should say that the list method doesn't search for sub-directories of the given directory denoted in the Path object passed to the method. In other words, list method does not search recursively but only the immediate entries of the specified directory.The usage of Files.list method is correct but it returns a stream of Path objects for files contained in a directory. Unlike the Files.find method, the list method doesn't search for files. It just returns all the files in a given directory.