What is the result, if doc is present in the current directory?

Given the following files in doc directory: And the code fragment: What is the result, if doc is
present in the current directory?

Given the following files in doc directory: And the code fragment: What is the result, if doc is
present in the current directory?

A.
index.htm userguide.txt logo.gif

B.
index.htm service.html userguide.txt logo.gif

C.
index.htm

D.
No output is produced.



Leave a Reply 2

Your email address will not be published. Required fields are marked *


leo yu

leo yu

D) is correct
Files.walkFileTree(Paths.getPath(“doc/*.*”),new SimpleFileVisitor(){
search
visitFile
}

will return the files under doc directory