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-809 Topic 8 Question 60 Discussion

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

Given the code fragment:

List nL = Arrays.asList(''Jim'', ''John'', ''Jeff'');

Function funVal = s -> ''Hello : ''.contact(s);

nL.Stream()

.map(funVal)

.peek(System.out::print);

What is the result?

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

Muriel
1 months ago
I'm just hoping the exam doesn't ask us to write any code with lambdas. That's the real challenge here.
upvoted 0 times
...
Annelle
1 months ago
Ah, the good old days when we had to type out 'new ArrayList()' instead of this fancy 'Arrays.asList()' business. Kids these days have it easy!
upvoted 0 times
Penney
2 days ago
B) Jim John Jeff
upvoted 0 times
...
Honey
4 days ago
B) Jim John Jeff
upvoted 0 times
...
Penney
11 days ago
A) Hello : Jim Hello : John Hello : Jeff
upvoted 0 times
...
Honey
18 days ago
A) Hello : Jim Hello : John Hello : Jeff
upvoted 0 times
...
...
Celestine
1 months ago
I'm feeling a little hungry. Maybe I should've had a snack before this exam. Oh, and I'm pretty sure the answer is A.
upvoted 0 times
...
Christa
2 months ago
Ah, I see what's going on here. The stream is being processed, but the results aren't being collected anywhere. Option C might be the winner.
upvoted 0 times
Izetta
6 days ago
Looks like we're all in agreement. Option C it is.
upvoted 0 times
...
Izetta
9 days ago
I think so too. The program doesn't seem to be collecting the results anywhere.
upvoted 0 times
...
Izetta
26 days ago
Yes, you're right. Option C seems to be the most likely outcome.
upvoted 0 times
...
...
Orville
2 months ago
Wait, what's this 'contact' method? Shouldn't it be 'concat'? I'm going to have to double-check that.
upvoted 0 times
Lamar
19 days ago
User3: Yeah, I agree. It should be 'concat'.
upvoted 0 times
...
Susy
21 days ago
User2: A) Hello : Jim Hello : John Hello : Jeff
upvoted 0 times
...
Tesha
26 days ago
User1: I think it's supposed to be 'concat' not 'contact'.
upvoted 0 times
...
...
Christiane
2 months ago
Hmm, the stream processing looks pretty straightforward. I think I'll go with option A.
upvoted 0 times
Norah
1 months ago
Yes, the stream processing will print Hello : Jim Hello : John Hello : Jeff.
upvoted 0 times
...
Jade
2 months ago
I agree, option A seems correct.
upvoted 0 times
...
...
Carylon
3 months ago
I'm not sure, but I think the answer might be D) A compilation error occurs because there is a syntax error in the code fragment.
upvoted 0 times
...
Stephaine
3 months ago
I agree with Rolande, because the code fragment uses map and peek functions to apply the funVal function to each element in the stream.
upvoted 0 times
...
Rolande
3 months ago
I think the answer is A) Hello : Jim Hello : John Hello : Jeff
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