int intArray[] = { 1, 2, 3, 4, 5 }; IntIterator begin = IntIterator.begin( intArray ); IntIterator end = IntIterator.end( intArray ); Number sum = Counting.accumulate( begin, end, new Integer( 0 ) ); System.out.println( "Sum = " + sum );