Java Classes
In your main method, make an array of type Person Fill it with Person objects of the following people and then print the names of each from that array. Each person should be on their own line formatted as shown below. Fred, 24 Sally, 26 Billy, 15 Here is what I got so far but its throwing an error: class Main { public static Person[] people; public static void main(String[] args) { people[0] = new Person("Fred", 24); people[1] = new Person("Sally", 26); people[2] = new Person("Billy", 15); for(int i = 0; i < people.length; ++i){ System.out.println(people[i].name + people[i].age); } } } public class Person{ public String name; public int age; public Person(String name, int age){ this.name = name; this.age = age; } public String getName(){ return name; } public void setName(String name){ this.name = name; } public int getAge(){ return age; } public void setAge(int age){ this.age = age; } }