What is the result of `Stream.of(1, 2, 3).reduce(1, (a, b) -> a * b)`?
Correct answer
12
Explanation
1 * 1 * 2 * 3 = 6, and since the identity is also 1, it multiplies to 6.
Update: Admin added a tag on this question
Topics
By Admin · · 30 views