title: What is the best way to return a list<t> via a method?
body: <p>Suppose I have a method that returns a list of String names.</p>
  
  <pre><code>public List&lt;String&gt; buildNamesList(){
     List&lt;String&gt; namesList = new List&lt;String&gt;();
     //add several names to the list
     return namesList;
  }
  </code></pre>
  
  <p>Now if I have a method that needs that namesList would returning it like so be the best way?</p>
  
  <pre><code>public void someMethod(){
    List&lt;String&gt; namesList = new List&lt;String&gt;();
    namesList = buildNamesList();
    //traverse namesList
  }
  </code></pre>