Is there possibility of sum of ArrayList without looping?
ArrayList
PHP provides sum(array) which will give the sum of array.
sum(array)
The PHP code is
Or switch to Groovy, it has a sum() function on a collection. [1,2,3,4,5,6].sum()
http://groovy.codehaus.org/JN1015-Collections
Runs on the same JVM as your java classes.