Goukei.java



public class Goukei {

    public static void main( String[] args ) {

        int[] data = { 10, 75, 24, 32, 98,
                       72, 88, 43, 60, 35,
                       54, 62,  2, 12, 82,
                     };

        int sum = goukei( data );
        System.out.println( "Sum:" + sum );
    }

    public static int goukei( int[] data ) {

        int sum = 0;
        for( int i=0; i<data.length; i++ ) {
            sum += data[i];
        }
        return sum;
    }
}