title: Java - ArrayList<Integer> as Parameter...?
body: <p>I would like to know how to create a method which takes an ArrayList of Integers (ArrayList) as a parameter and then display the contents of the ArrayList?</p>
  
  <p>I have some code which generates some random numbers and populates the ArrayList with the results, however I keep having errors flag up in eclipse when attempting to create this particular method.</p>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>public void showArray(ArrayList&lt;Integer&gt; array){
  
      return;
  
  }
  </code></pre>
  
  <p>I know that it is very basic, but I am unsure exactly how to approach it - could it be something like the following?</p>
  
  <pre><code>public void showArray(ArrayList&lt;Integer&gt; array){
  
      Arrays.toString(array);
  
  }
  </code></pre>
  
  <p>Any assistance would be greatly appreciated.</p>
  
  <p>Thank you.</p>