title: Java: The most efficient way to write pojo with ArrayList
body: <p>What is the most correct and/or efficient way in terms of time &amp; memory consumption to write simple pojo class containing ArrayList? (Regarding java mechanism for references, pass by ref', assignments etc.):</p>
  
  <pre><code>public class MyClass {
  
      //1. Do we need to initialize here?
      public List&lt;String&gt; mList = new ArrayList&lt;&gt;();
  
      //2. Do we need to declare D. Constructor?
      public MyClass() {}
  
      //3. Need to initialize the list here or just pass?
      public MyClass(List&lt;String&gt; list) {
          this.mList = list;
      }
  
      //4. Better way for copy/assignment?
      public void setMlist(List&lt;String&gt; list) {
          this.mList = list;
      }
  
      public List&lt;String&gt; getMList() {
          return this.mList;
      }
  
  }
  </code></pre>