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 14 Question 85 Discussion

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

Given the code fragment:

UnaryOperator uo1 = s -> s*2;line n1

List loanValues = Arrays.asList(1000.0, 2000.0);

loanValues.stream()

.filter(lv -> lv >= 1500)

.map(lv -> uo1.apply(lv))

.forEach(s -> System.out.print(s + '' ''));

What is the result?

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

Larue
11 hours ago
Ha! I bet someone will say the answer is 'A compilation error occurs' just to be tricky.
upvoted 0 times
...
Chun
2 days ago
The key is understanding the UnaryOperator type. It's going to apply the lambda function to each element in the stream, doubling the value.
upvoted 0 times
...
Celestina
17 days ago
I think the result will be 4000.0
upvoted 0 times
...
Wai
18 days ago
Hmm, the question seems straightforward. I think the answer is A) 4000.0.
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