title: How to call an ArrayList
body: <p>I'm trying to append all of numbers that the program generates, into an array.</p>
  
  <p>I used ArrayList method. However i can't manage program to read arr elements.</p>
  
  <pre><code>import java.util.Random;
  import java.util.ArrayList;
  public class Numbers {
  public ArrayList&lt;Double&gt; getNumbers( )
  {
      Random getNum=new Random();
      ArrayList&lt;Double&gt; arr=new ArrayList&lt;Double&gt;(1000);
  
      int size=1000;
      for(int i=0;i&lt;size;i++)
      {
          double gauss=getNum.nextGaussian()*15+70;
          arr.add(gauss);
      }
      System.out.println(arr);
      return arr;
  }
  }
  </code></pre>
  
  <p>Furthermore; i'm trying all generated numbers to be read via another method.
  (That part is the following)</p>
  
  <p>How can the program read all generated numbers?</p>
  
  <pre><code>double [] numbers= StdIn.getNumbers();  // Stuck at here.
  </code></pre>
  
  <p>Is it possible to calling getNumbers method like that?</p>