title: How do I iterate through the values of a row from a result set in java?
body: <p>The result set I'm speaking of this:
  <a href="http://docs.oracle.com/javase/1.4.2/docs/api/java/sql/ResultSet.html" rel="noreferrer">http://docs.oracle.com/javase/1.4.2/docs/api/java/sql/ResultSet.html</a></p>
  
  <p>What I would like to do is this...</p>
  
  <pre><code>for row in rows
      for col in row
          //col is the name of the column, row[col] is the value.
  </code></pre>
  
  <p>I'm more profecient in PHP, than JSP, fyi. This would be done in PHP like so:</p>
  
  <pre><code>foreach($rs as $row)
      foreach($row as $col =&gt; $val)
          //val is the cell value, and column is the column name
  </code></pre>
  
  <p>EDIT: I'm looking for a generic solution. notice how col is a variable, not a literal.</p>