PersonDemo2.java
1    /* 
2     * PersonDemo1 is a simple program to create and textually display Person 
3     *  objects, together with initials and an indication of whether or not the 
4     *  person is a baby boomer. 
5     */
6    
7    package people;
8    
9    import java.lang.reflect.Array;
10   
11   public class PersonDemo2 {
12       public static void main(String[] args){
13           Person bd = new Person("Bob Dylan",5,24,1941);
14           Person nr = new Person("Noomi Rapace", 12,28,1974);
15           Person pw = new Person("Pharrel Williams",1,2,1988);
16           Person fs = new Person("Frank Sinatra",5,8,1964);
17           Person dk = new Person("Diana Krall",8,8,1982);
18           Person kka = new Person("KoKo Aung",8,5,2001);
19   
20           Person[] person = {bd,nr,pw,fs,dk,kka};
21   
22           //Display the six person objects to standard output stream
23           for(int i =0; i<person.length;i++){
24               System.out.println(person[i]+" "+person[i].initials()+" "+person[i].isBoomer());
25           }
26   
27       }
28   }
29