Sepehr Sobhani Sepehr Sobhani - 1 year ago 63
Java Question

Get the product of a list using java Lambdas

How do you get the product of a array using java Lambdas. I know in C# it is like this:

result = array.Aggregate((a, b) => b * a);

edit: made the question more clear.

Answer Source, (a, b) -> a * b);