Exam 1z0-809 All QuestionsBrowse all questions from this exam
Question 140

Given the code fragment:

What is the result?

    Correct Answer: A

    The code uses the Stream API's reduce method to concatenate the elements of the list 'qwords' prefixed with the initial value "Word: ". The reduce method applies the BinaryOperator to each element of the stream, concatenating each string to the accumulated result. Therefore, the resulting string will be "Word: " followed by each element of the list concatenated together. The final output is "Word: why what when".

Discussion
Svetleto13Option: A

A,tested

steefaandOption: A

A is correct.

Manuel7000Option: A

A. Agree