Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Oracle Exam 1Z0-809 Topic 13 Question 26 Discussion

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

Given the code fragments:

class TechName {

String techName;

TechName (String techName) {

this.techName=techName;

}

}

and

List tech = Arrays.asList (

new TechName(''Java-''),

new TechName(''Oracle DB-''),

new TechName(''J2EE-'')

);

Stream stre = tech.stream();

//line n1

Which should be inserted at line n1 to print Java-Oracle DB-J2EE-?

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

Sharen
6 days ago
Haha, I bet the exam writer is just trying to confuse us with all these stream operations. As long as I can remember to use map() to get the techName field, I should be good to go!
upvoted 0 times
...
Peter
8 days ago
I'm not sure why we need to use forEachOrdered() in options C and D. Isn't that just for maintaining the original order of the stream?
upvoted 0 times
...
Leonor
14 days ago
Option B looks like the correct answer to me. The stream needs to be mapped to the techName field before printing it out.
upvoted 0 times
Judy
1 days ago
I think option B is the correct answer.
upvoted 0 times
...
...
Verdell
21 days ago
I'm not sure, but I think D could also work since it ensures the elements are printed in order.
upvoted 0 times
...
Paul
23 days ago
I agree with Stephaine, because we need to map the techName before printing.
upvoted 0 times
...
Stephaine
28 days ago
I think the answer is B.
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