title: How to call an Arraylist method?
body: <p>I have a method:</p>
  
  <pre><code>public static ArrayList&lt;Integer&gt;Iterate(int n){
      ArrayList&lt;Integer&gt; numbers = new ArrayList&lt;Integer&gt;(n);{
          Random rand = new Random();
          rand.setSeed(System.currentTimeMillis());
          for(int i = 0; i&lt;n; ++i){
              Integer r = rand.nextInt() %113;
              numbers.add(r);
              Collections.sort(numbers);
          }}
  </code></pre>
  
  <p>And I want to use other methods on this Array to find out certain things about the numbers. </p>
  
  <p>But I can't figure out to call the Arraylist in <code>public static void main(String [] args)</code>.</p>
  
  <p>I've tried things like: </p>
  
  <pre><code>System.out.println( numbers.methodname); 
  </code></pre>
  
  <p>And things like that, but Eclipse says numbers cannot be resolved to a variable
  So what's the proper way to call the ArrayList so a method can effect it?  </p>