What is the `reduce()` operation in Java Streams?
The `reduce()` operation in streams is used to convert a stream into a collection, like converting a list to a set.
Thatâ€™s partially correct. `reduce()` is not used to convert a stream into a collection, but to combine elements into a single value.
Can you explain how you would use `reduce()` to calculate the sum of all elements in a stream?