1 package people; 2 3 public class PersonDemo2 { 4 public static void main(String[] args) { 5 6 //create an Array of person objects of size 6 and fill it with data 7 Person bd = new Person ("Bob Dylan", 5, 24, 1941); 8 Person nr = new Person ("Noomi Rapace", 12, 28, 1974); 9 Person pw = new Person ("Pharrell Williams", 4, 5, 1973); 10 Person fs = new Person ("Frank Sinatra", 12, 12, 1915); 11 Person dk = new Person ("Diana Krall", 11, 16, 1964); 12 Person et = new Person ("Emily Tepfenhart", 4, 21, 1996); 13 14 Person[] people = new Person[6]; 15 people[0] = bd; 16 people[1] = nr; 17 people[2] = pw; 18 people[3] = fs; 19 people[4] = dk; 20 people[5] = et; 21 22 for (int i = 0; i < people.length; i++) { 23 System.out.println(people[i]); 24 } 25 26 } 27 } 28