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

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?
A. Stream<Path> stream = Files.list (Paths.get ("/company"));
B. Stream<Path> stream = Files.find(
Paths.get ("/company"), 1,
(p,b) -> b.isDirectory (), FileVisitOption.FOLLOW_LINKS);
C. Stream<Path> stream = Files.walk (Paths.get ("/company"));
D. Stream<Path> stream = Files.list (Paths.get ("/company/emp"));

Download Printable PDF. VALID exam to help you PASS.

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

  1. on unix it works like this:
    Stream stream = Files.find(Paths.get(“/company/emp”),0,(p,b)->b.isDirectory(), FileVisitOption.FOLLOW_LINKS);

Leave a Reply

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


The reCAPTCHA verification period has expired. Please reload the page.