posted 14 years ago
ia is an array of objects.
ia[i] gets you the i'th element in that array.
(Integer) ia[i]) casts that object reference to an Integer.
((Integer) ia[i]).intValue() gets you the int value of the Integer.
sum += ((Integer) ia[i]).intValue(); adds the int value to whatever is currently in sum.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors