List of usage examples for java.util.stream LongStream reduce
long reduce(long identity, LongBinaryOperator op);
From source file:Main.java
public static void main(String[] args) { LongStream b = LongStream.of(1L, 2L, 3L, 4L); long v = b.reduce(0, Long::sum); System.out.println(v);/* w w w. j av a 2 s.com*/ }