PersonDemo2.java
1    package people;
2    /* 
3    * This Java program uses an array of Person objects to test the Person class. 
4     */
5    
6    public class PersonDemo2 {
7        public static void main(String[] args)
8        {
9            Person [] people = new Person[6];
10           people[0] = new Person("Bob Dylan", 5,24,1941);
11           people[1] = new Person("Noomi Rapace", 12,28,1974);
12           people[2] = new Person("Pharrell Williams", 4,5,1973);
13           people[3] = new Person("Frank Sinatra",12, 12, 1915);
14           people[4] = new Person("Diana Krall", 11, 16, 1964);
15           people[5] = new Person("Kayla Gray", 11, 2,2001);
16   
17           for(int i = 0; i < people.length; i++)
18           {
19               System.out.println(people[i]);
20           }
21   
22       }
23   }
24