1 package people; 2 3 import java.util.List; 4 5 6 public class PersonDemo2 { 7 public static void main(String[] args ){ 8 Person[] list = new Person[6]; 9 list[0] = new Person("Bob Dylan",5,24,1941); 10 list[1] = new Person("Naomi Rapace",12,28,1974); 11 list[2] = new Person("Pharrell Williams",4,5,1973 ); 12 list[3]= new Person("Frank Sinatra",12,12,1915 ); 13 list[4]= new Person("Diana Krall",11,16,1964); 14 list[5]= new Person("Jeremi Chimbo",4,18,1999); 15 int x= 0; 16 for(x=0; x<list.length-1;){ 17 System.out.println(list[x]); 18 x++; 19 } 20 } 21 } 22