Is there possibility of sum of ArrayList without looping

Once is out (March 2014) you’ll be able to use streams:

If you have a List<Integer>

int sum = list.stream().mapToInt(Integer::intValue).sum();

If it’s an int[]

int sum = IntStream.of(a).sum();

Leave a Comment