title: allocating for array and then using constructor
body: <h3>Person.java</h3>
  <pre><code>public class Person {
      public String firstName, lastName;
  
      public Person(String firstName,
              String lastName) {
          this.firstName = firstName;
          this.lastName = lastName;
      }
  
      public String getFullName() {
          return(firstName + &quot; &quot; + lastName);
      }
  }
  </code></pre>
  <h3>PersonTest.java</h3>
  <pre><code>public class PersonTest {
      public static void main(String[] args) {
          Person[] people = new Person[20];              //this line .
          for(int i=0; i&lt;people.length; i++) {
              people[i] = 
                  new Person(NameUtils.randomFirstName(),
                          NameUtils.randomLastName());  //this line
          }
          for(Person person: people) {
              System.out.println(&quot;Person's full name: &quot; +
                      person.getFullName());
          }
      }
  }
  </code></pre>
  <p>In above code, we used twice &quot;new&quot;. Is this code is correct or wrong? First one is for allocation of array. But why the second one? It's from lecture notes.</p>