Oracle Java SE 8 Programmer II 1z0-809 Question # 33 Topic 4 Discussion

Oracle Java SE 8 Programmer II 1z0-809 Question # 33 Topic 4 Discussion

1z0-809 Exam Topic 4 Question 33 Discussion:
Question #: 33
Topic #: 4

Given the code fragment:

List colors = Arrays.asList(“red”, “green”, “yellow”);

Predicate test = n - > {

System.out.println(“Searching…”);

return n.contains(“red”);

};

colors.stream()

.filter(c -> c.length() >= 3)

.allMatch(test);

What is the result?


A.

Searching…


B.

Searching…Searching…


C.

Searching…Searching…Searching…


D.

A compilation error occurs.


Get Premium 1z0-809 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.