public class Person {
public String firstName, lastName;
public Person(String firstName,
String lastName) {
this.firstN
Yes, it is correct.
The line:
Person[] people = new Person[20]
allocates the array, full of references to null
while the line:
new Person(NameUtils.randomFirstName(),
NameUtils.randomLastName()); //this line
fills it [the array] by instantiating objects of type Person
, and assigning the reference in the array.