Given the code fragment: List<Integer> list1 = Arrays.asList(10, 20); List<Integer> list2 = Arrays.asList(15, 30); //line n1 Which code fragment, when inserted at line n1, prints 10 20 15 30?
Not tested, but I think :
- B doesn't compile because List.intStream() doesn't exist
- C doesn't compile because Stream.flatMap() expects a function as parameter, while a Stream is provided
- D almost compiles but doesn't : flatMapToInt() exists, though a wrong parameter is provided.
Expected: Function<List<Integer>, IntStream>
Provided: Function<List<Integer>, Stream<Integer>>
This section is not available anymore. Please use the main Exam Page.1z0-809 Exam Questions
Log in to ExamTopics
Sign in:
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.
thetech
Highly Voted 5 years, 1 month agoM_Jawad
Highly Voted 4 years, 11 months agoasdfjhfgjuaDCV
Most Recent 9 months, 3 weeks agosteefaand
10 months, 3 weeks agoGaelBernard
1 year, 4 months agoWilsonKKerll
2 years, 9 months agojduarte
3 years, 9 months agoayzo
3 years, 11 months agothetech
5 years, 1 month ago