title: How to convert a ArrayList of array of int to array of array of int in Java?
body: <p>I have below code</p>
  <pre><code>List&lt;int[]&gt; result = new ArrayList&lt;int[]&gt;();
  result.add(new int[]{1,2});
  result.add(new int[]{2,3});
  int[][] re= result.toArray();
  </code></pre>
  <p>I tried to use toArray method to convert it to <code>int[][]</code> data format. But, it will throw error,&quot;incompatible types: Object[] cannot be converted to int[][]&quot;.  Can someone explain the reason? and what I should do to convert it?</p>