// // Arrays // public class TestArray { public static void main(String[] args) { // Q: declare an array myArr that can hold up to 10 words? String[] myArr = new String[10]; // Q: let the last one be "ODU", and 3rd one "VWC"? myArr[9] = "ODU"; myArr[2] = "VWC"; // Q: make all components "USA"? for(int i=0; i<10; i++) myArr[i] = "USA"; // Q: change 1st to "VWC"; 2nd to "UVA"? myArr[1] = "UVA"; myArr[0] = "VWC"; // Q: out all to monitor outPut(myArr); System.out.println("\n\nDone.\n\n"); } //------------------------------ private static void outPut(String[] arr) { for(int i=0; i<10; i++) System.out.print(arr[i] + " "); System.out.println(); } }