Person2Demo.java
1    package people;
2    
3    public class Person2Demo {
4        public static void main (String[] args){
5            Person[] people = new Person[6];
6    
7            Person e = new Person("Ellen Weber", 8, 14, 2000);
8            Person k = new Person("Kate Brand", 4, 29, 2000);
9            Person g = new Person("Gabby Sennert", 5, 29, 2000);
10           Person a = new Person("Alex Ehrenberg", 9, 28, 2000);
11           Person gw =new Person("Greg Weber", 3,3, 1964);
12           Person h = new Person ("Haley Knight", 5, 2, 1947);
13   
14           people[0] = e;
15           people[1] = k;
16           people[2] = g;
17           people[3] = a ;
18           people[4] = gw;
19           people[5] = h;
20   
21           for (int i = 0; i < people.length; i = 1 + i){
22               System.out.println(people[i]);
23           }
24   
25       }
26   }
27