E is correct:
A: readAllLines return a List<String> not Stream<String> //not compilee
B: print true
C: print true false true
D: not compile because contains return true and is expected list<string>
So E is correct answer readAllLines return a stream that is filter only lines "java" and print that elements
123:Java:1
124:Java Server Pages:3
E Files.lines(filePath).filter(s->s.contains("Java")).forEach(System.out::println);
upvoted 1 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
bf8f3be
2 weeks, 5 days agod7bb0b2
6 months, 1 week agoStavok
12 months agoKiraguJohn
1 year ago