title: Resultset into 2d array
body: <p>I just did a mysql query, which was put into a resultset called result.</p>
  
  <p>Now i want it to go into a 2d object, which i can use to show the query result later on.</p>
  
  <p>I am not quite sure how to do it, if i should make a while loop and then put into an array.
  I have tested that there is something in the result by out.write it to a txt file.</p>
  
  <pre><code>ResultSet result = stmt.executeQuery(sql);
  </code></pre>
  
  <p>Here is what i got, i tried:</p>
  
  <pre><code>int i =0;
          sqlresult = new String[result.getMetaData().getColumnCount()];
          while(result.next()){
              sqlresult[i] = result.getArray(sql);
              i++;
          }
  </code></pre>
  
  <p>But this i keep getting an error, and its only 1d array.</p>