Is there a sum() equivalent method in stream which can perform multiplication of values given in a stream?
I've a list of Integers like this :
List<Integer> listOfIntegers = new ArrayList<>();
listOfIntegers.stream().mapToInt(a -> a).sum();
Try reduce of streams, it should help.
listOfIntegers.stream().reduce(1, (a, b) -> a * b)
This link provides more information on how to use reduce.