title: How to return an arraylist?
body: <p>I would like to return an arraylist from a non-class method in java, i have searched around but found nothing so far.</p>
  
  <pre><code>{
       int d=e.length();
       ArrayList list2 = new ArrayList();
       for (int i=0;i&lt;d;i++)
       {
           list2.add('_');
       }
       return list2;
  }
  </code></pre>
  
  <p>Thanks alot!</p>