arrays.stream.sum( java code example
Example: sum of arraylist java 8
int total = numbers.stream().mapToInt(i -> i.intValue()).sum();
System.out.print(total);
int total = numbers.stream().mapToInt(i -> i.intValue()).sum();
System.out.print(total);