nerdexam
Oracle

1Z0-809 · Question #37

List<String> colors = Arrays.asList("red", "green", "yellow"); Predicate<String> test = n -> { System.out.println("searching" + n); return n.contains("red"); }; colors.stream() .filter(c ->…

The correct answer is B. Searching"red" Searching"green" Searching"yellow". You've hit your session limit · resets 5:20pm (America/New_York)

Question

List<String> colors = Arrays.asList("red", "green", "yellow"); Predicate<String> test = n -> { System.out.println("searching" + n); return n.contains("red"); }; colors.stream() .filter(c -> c.length() >= 3) .allMatch(test); What is the result?

Options

  • ASearching"red" Searching"green" Searching"yellow" Searching"red"
  • BSearching"red" Searching"green" Searching"yellow"
  • CSearching"red" Searching"yellow" Searching"green"
  • DA compilation error occurs.

How the community answered

(55 responses)
  • A
    4% (2)
  • B
    76% (42)
  • C
    13% (7)
  • D
    7% (4)

Explanation

You've hit your session limit · resets 5:20pm (America/New_York)

Community Discussion

No community discussion yet for this question.

Full 1Z0-809 Practice