title: Instance Variable Declaration and instantiation
body: <p>I want to know what is the difference between these two ways of instantiating instance variable. In either case it would create an instance of the <code>persons</code> when an instance of <code>PersonDirectory</code> is created.</p>
  
  <pre><code>public class PersonDirectory {
      private ArrayList&lt;Person&gt; persons = new ArrayList&lt;&gt;();
  
  }
  
  
  public class PersonDirectory {
      private ArrayList&lt;Person&gt; persons;
      public PersonDirectory(){
          persons = new ArrayList&lt;Person&gt;();
      }
  }
  </code></pre>