/* This shows some simple uses of a for() loop. This second example passes an array reference to a method, prints out values and creates a new array. Note that after the method returns the old values are printed out since the creation of a new array object doesn't effect the contents of the initial reference */ public class arraymodifier_v2 { public static void main(String args[]) { // Create and initialize an integer array int[] intarray = {8, 12, -3, 5}; // Call the arraymod method // Note that the intarray reference is used as a parameter arraymod(intarray); // This for loop prints out all the values in the intarray array. // Note that the values have not been modified by the arraymod method for(int i=0 ; i