Given the directory structure that contains three directories: company, Salesdat, and Finance:
Company
– Salesdat
* Target.dat
– Finance
* Salary.dat
* Annual.dat
And the code fragment:
If Company is the current directory, what is the result?
A.
Prints only Annual.dat
B.
Prints only Salesdat, Annual.dat
C.
Prints only Annual.dat, Salary.dat, Target.dat
D.
Prints at least Salesdat, Annual.dat, Salary.dat, Target.dat
Explanation:
IF !! return FileVisitResult.CONTINUE;
The pattern *dat will match the directory name Salesdat and it will also match the file Annual.dat.
It will not be matched to Target.dat which is in a subdirectory.
The answer should be C.
Agree
+1
ok