public class ArrayPracticeScript { /** * @param args */ public static void main(String[] args) { //Declaring an Array[] String[] teamMembers = new String[12]; //OR String teamMembers2[] = new String[12]; //OR String[] teamMembers3; teamMembers3 = new String[12]; //Initializing an Array // Declare and initialize in the same statement String[] teamMembers4 = {"Dodge", "Newman", "Henderson", "Canning", "Stein"}; // array size determined by the number of values provided. // This method is used when you already know the contents of the array. //OR String[] teamMembers5 = new String[5]; // declare the array teamMembers5[0] = "Dodge"; // initialize the array elements teamMembers5[1] = "Newman"; teamMembers5[2] = "Henderson"; teamMembers5[3] = "Canning"; teamMembers5[4] = "Stein"; //Iterate through an Array for (int index = 0; index < teamMembers5.length; index++) System.out.println(teamMembers5[index]); // What happens if you replace < with <= ???? This is a very common error with arrays. }// end of main method }