exam questions

Exam 1z0-809 All Questions

View all questions & answers for the 1z0-809 exam

Exam 1z0-809 topic 1 question 129 discussion

Actual exam question from Oracle's 1z0-809
Question #: 129
Topic #: 1
[All 1z0-809 Questions]

Given the code fragment:

What is the result?

  • A. Java EEJava EESE
  • B. Java EESE
  • C. The program prints either: Java EEJava SE or Java SEJava EE
  • D. Java EEJava SE
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
vidhuharu
3 months, 1 week ago
Selected Answer: C
I opt for option C. since it is a parallel stream we cannot predict the order of the output
upvoted 1 times
...
steefaand
11 months, 1 week ago
Selected Answer: D
Answer is D. Tested.
upvoted 1 times
...
Ohayou
2 years, 10 months ago
Answer D
upvoted 1 times
...
Eason_from_the_future
3 years, 4 months ago
D, tested public static void main(String[] args) { List<String> nums = Arrays.asList("EE", "SE"); String ans = nums.parallelStream().reduce("Java", (a, b) -> a.concat(b)); System.out.println(ans); }
upvoted 1 times
...
Svetleto13
3 years, 8 months ago
D,tested
upvoted 2 times
Svetleto13
3 years, 7 months ago
If we test the code with stream(),not parallelStream(),answer is B.
upvoted 2 times
...
...
JME_CHG
3 years, 10 months ago
B and D are both possibilities... "Java" is not a true identity so can give unexpected results, but due to encounter order, will always be EE before SE...
upvoted 2 times
...
laura_lu93
3 years, 10 months ago
tested is D
upvoted 3 times
...
Because it's parallelStream,
upvoted 1 times
...
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago