// Sum Java class // This sample reads a bunch of integers entered as command line arguments // sums them up and prints the sum and average. public class Sum { public static void main( String nums[] ) { // create an int array of the right size int[] ivals = new int[nums.length]; // convert each string to integer for (int i=0;i