Upgrade Java SE 7 to Java SE 8 OCP Programmer (1Z0-810)

© examsiri.com
Question : 6 of 8
 
Marks: +1, -0
Given that /report/jun.txt and report/data/jundata.txt files are accessible and given the code fragment:
public static void main(String[] args) {
  try (Stream st1 = Files.find(Paths.get("/report"), 2, (p, a) -> p.toString().endsWith("txt"));
    Stream st2 = Files.walk(Paths.get("/report"), 2);) {
    st1.forEach(s -> System.out.println("Found: " + s));
    st2.filter(s -> s.toString()
      .endsWith("txt"))
      .forEach(s -> System.out.println("Walked: " + s));
    } catch (IOException ioe) {
      System.out.println("Exception");
    }
}

What is the result?
Go to Question: