← Quiz: Java Streams in Depth: all 10 questions
Quiz: Java Streams in Depth · Question 6 of 10
Which identity value is correct for reduce when multiplying numbers?
Which identity value is correct for reduce when multiplying numbers?
- A.0
- B.1
- C.-1
- D.Integer.MAX_VALUE
Answer & explanation
Correct answer: 1
The identity must not change the result: x * 1 = x. Starting from 0 would make every product 0.
Can you get the rest right without peeking?
Take the timed Quiz: Java Streams in Depth quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →