public static /*@pure@*/ int sum ( int [ ] ints ) { int sum = 0 ; for ( int i = 0 ; i < ints . length ; i ++ ) { sum += ints [ i ] ; } return sum ; }
Computes the sum of the elements of an array of integers .