I have a ArrayList
whose one of the fields is BigDecimal
. I can not do this sum iteratively with a loop. Can anyone give a tip on how to perform this operation?
If it were a% common%, it would do the following, but using the bigdecimal, I can not think of a solution:
for(..){
valorTotal += lista.get(i).getValorItem();
}