title: Getters and Setters for ArrayLists in Java
body: <p>How would I go about using getters and setters for an ArrayList in Java? Here is what I have. I think I am using the getter correctly, but I don't know how to use a setter for an ArrayList.</p>
  
  <pre><code>private ArrayList&lt;String&gt; stringlist = new ArrayList&lt;String&gt;();
  public ArrayList&lt;String&gt; getStringList() {
      return stringlist;
  }
  
  public ArrayList&lt;String&gt; setStringList() {
      // I don't know what to put here
      // I also don't know if my return value is correct
  }
  </code></pre>