Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Oracle Exam 1Z0-829 Topic 8 Question 35 Discussion

Actual exam question for Oracle's 1Z0-829 exam
Question #: 35
Topic #: 8
[All 1Z0-829 Questions]

Given the code fragment:

Which code fragment returns different values?

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Blondell
1 months ago
I'm no mathematician, but I'm pretty sure 5 + 5 equals 10. So option E looks like the way to go! Though I do wonder if that's too obvious. Hmm, maybe I should have paid more attention in algebra class...
upvoted 0 times
Roxane
2 days ago
I think you're right, option E seems to be the correct one.
upvoted 0 times
...
...
Lenna
1 months ago
Anyone else see the pun in 'reduce' and 'sum'? It's like they're trying to reduce us to a sum! *laughs* Anyway, I'm going with C. That extra +5 at the end just feels a bit too sneaky for my liking.
upvoted 0 times
Lettie
3 days ago
I agree with you, C seems like the safest choice. Let's go with that.
upvoted 0 times
...
Lettie
4 days ago
I think D is the one that returns different values. That extra orElse(5) is suspicious.
upvoted 0 times
...
Lettie
14 days ago
Haha, I see what you did there! I'm going with B, seems straightforward.
upvoted 0 times
...
...
Buck
1 months ago
This is a tough one! I'm leaning towards D, since the parallelStream() might be more efficient for a large list. But the orElse(5) part makes me a bit nervous. Gotta love those functional programming tricks!
upvoted 0 times
...
Sabra
1 months ago
I'm torn between B and E. Both use the stream() method, but E adds the 5 at the end, which could be more readable. Hmm, decisions, decisions.
upvoted 0 times
Mayra
11 days ago
User 3: I agree with Mayra, E seems like the better choice for readability.
upvoted 0 times
...
Alonzo
22 days ago
User 2: I see your point, but E also adds 5 at the end which could make it more readable.
upvoted 0 times
...
Ilda
23 days ago
User 1: I think B is the correct one because it uses the reduce method with a lambda function.
upvoted 0 times
...
...
Jesse
2 months ago
Option B looks the most straightforward to me. The stream() method with reduce() and lambda expressions seems like the clearest way to get the sum of the list.
upvoted 0 times
...
Margart
2 months ago
But option D has a syntax error, so I still think option A is the correct answer.
upvoted 0 times
...
Malcolm
2 months ago
I disagree, I believe option D returns different values.
upvoted 0 times
...
Margart
3 months ago
I think option A returns different values.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77