// Review how to create, populate and manipulate arrays. public class TestArrays { public static void main(String[ ] argv) { // Create array of double using long method. double[ ] a; a = new double[3]; a[0] = 5.39; a[1] = 1.07; a[2] = 9.26; for(int i = 0; i < a.length; i++) System.out.print(a[i] + " "); System.out.println( ); // Create array of double using long method. double[ ] b = { 23.43, 45.83, 21.39, 82.81 }; for(int i = 0; i < b.length; i++) System.out.print(b[i] + " "); System.out.println("\n"); // Create array of String using long method. String[ ] c; c = new String[3]; c[0] = "dog"; c[1] = "cat"; c[2] = "mouse"; for(int i = 0; i < c.length; i++) System.out.print(c[i] + " "); System.out.println( ); // Create array of String using long method. String[ ] d = { "oppossum", "raccoon", "deer", "skunk" }; for(int i = 0; i < d.length; i++) System.out.print(d[i] + " "); System.out.println("\n"); // Create array of Person using long method. Person[ ] p; p = new Person[3]; p[0] = new Person("Alice", 'F', 23); p[1] = new Person("David", 'M', 29); p[2] = new Person("Judy", 'F', 19); for(int i = 0; i < p.length; i++) System.out.print(p[i] + " "); System.out.println( ); // Create array of Person using short method. Person[ ] q = { new Person("Chloe", 'F', 27), new Person("Brandon", 'M', 18), new Person("Susan", 'F', 34), new Person("Larry", 'M', 35) }; for(int i = 0; i < q.length; i++) System.out.print(q[i] + " "); System.out.println( ); } }