title: ArrayList of int array in java
body: <p>I'm new to the concept of arraylist. I've made a short program that is as follows:</p>
  
  <pre><code>ArrayList&lt;int[]&gt; arl=new ArrayList&lt;int[]&gt;();
  int a1[]={1,2,3};
  arl.add(0,a1);
  System.out.println("Arraylist contains:"+arl.get(0));
  </code></pre>
  
  <p>It gives the output: <code>Arraylist contains:[I@3e25a5</code></p>
  
  <p>Now my questions are:</p>
  
  <ol>
  <li>How to display the correct value i.e. 1 2 3.</li>
  <li>How can I access the single element of array a1 i.e. if I want to know the value at a1[1].</li>
  </ol>