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? Options: Found: \report\data\jundata.txt Found: \report\jun.txt Walked: \report\data\jundata.txt Walked: \report\jun.txt Found: \report\data\jundata.txt Found: \report\jun.txt Walked: \report\data\jundata.txt Walked: \report Walked: \report\jun.txt Walked: \report\data\ Found: \report\jun.txt Walked: \report\data\jundata.txt Walked: \report\jun.txt Found: \report\jun.txt Walked: \report Walked: \report\jun.txt Walked: \report\data\ Walked: \report\data\jundata.txt" >