title: convert ArrayList<String> to String[][]
body: <p>I'm trying to convert and Arrayylist of type string to a 2d-array, String[][] using the following way</p>
  
  <pre><code>    ArrayList&lt;String&gt; arrayList = new ArrayList&lt;String&gt;(); 
      arrayList.add("report1");
      arrayList.add("report2");
      arrayList.add("report3");
  
      String[][] array = new String[arrayList.size()][];
      for (int i = 0; i &lt; arrayList.size(); i++) {
          ArrayList&lt;String&gt; row = arrayList.get(i);
          array[i] = row.toArray(new String[row.size()]);
      }
  </code></pre>
  
  <p>resulting a compilation error at <code>ArrayList&lt;String&gt; row = arrayList.get(i);
  </code></p>
  
  <p>Need suggestions to resolve this or is there anyother way I can achieve the same</p>