The data.doc, data.txt and data.xml files are accessible and contain text.
Given the code fragment:
Stream<Path> paths = Stream.of (Paths. get("data.doc"),
Paths. get("data.txt"),
Paths. get("data.xml"));
paths.filter(s-> s.toString().contains("data")).forEach(
s -> {
try {
Files.readAllLines(s)
.stream()
.forEach(System.out::println); //line n1
} catch (IOException e) {
System.out.println("Exception");
}
}
);
What is the result?
sansay61
Highly Voted 4 years, 6 months agofffff
Highly Voted 4 years, 4 months ago6c84cb9
Most Recent 10 months, 4 weeks agoasdfjhfgjuaDCV
1 year, 3 months agosteefaand
1 year, 4 months agoiSnover
1 year, 5 months agoShad657
1 year, 11 months agotuyetan
2 years agoshivkumarx
1 year, 3 months agoKim514
2 years, 3 months agolchowen
2 years, 9 months agoWilsonKKerll
3 years, 3 months agoaymanj
4 years, 3 months agovarconite
4 years, 6 months agomjcotan
3 years, 9 months ago