add all int in list 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);