C.
code:
public static void main (String[] args) throws InterruptedException, ExecutionException {
List<String> li = Arrays.asList("pen", "a", "pencil");
Predicate<String> test = s -> {
int i = 0;
boolean result = s.contains("pen");
System.out.print(i++ + ":");
return result;
};
li.stream().filter(test).findFirst().ifPresent(System.out::println);
}
This section is not available anymore. Please use the main Exam Page.1z0-809 Exam Questions
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.
LocalHero
7 months, 3 weeks agosteefaand
10 months, 3 weeks agoduydn
1 year, 3 months agobalike
2 years, 5 months agoWilsonKKerll
2 years, 9 months agoSvetleto13
3 years, 7 months agojduarte
3 years, 10 months ago