public class Person { public String firstName, lastName; public Person(String firstName, String lastName) { this.firstN
Person[] people = new Person[20];
only allocates memory for objects Person (filled with nulls). Then you need to fill it with particular Persons (with random name and surname int this example).