nerdexam
Oracle

1Z0-829 · Question #25

1Z0-829 Question #25: Real Exam Question with Answer & Explanation

Sign in or unlock 1Z0-829 to reveal the answer and full explanation for question #25. The question stem and answer options stay visible for context.

Working with Streams and Lambda expressions

Question

Given the code fragment: Stream<String> s1 = Stream.of("A", "B", "C", "B"); Stream<String> s2 = Stream.of("A", "D", "E", "B"); Stream.concat(s1, s2).parallel().distinct().forEach(element -> System.out.print(element)); What is the result?

Options

  • AADEABCB // the order of element is unpredictable
  • BABCE
  • CABCDE // the order of elements is unpredictable
  • DABBDE // the order of elements is unpredictable

Unlock 1Z0-829 to see the answer

You've previewed enough free 1Z0-829 questions. Unlock 1Z0-829 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#Stream.concat()#parallel()#distinct()#stream ordering
Full 1Z0-829 Practice