//for array Stream.of(new int[]{3,4,5}).reduce(0, (a,b)->a+b) //or if a list list.stream().reduce(0, Integer::sum)