Put ResultSet into HashMap?
<p>I have an mySQL ResultSet and I want to store that in my HashMap:</p>

<pre><code>Map&lt;String, Integer&gt; myMap = new HashMap&lt;String, Integer&gt;();
</code></pre>

<p>Gets the Result set here then:</p>

<pre><code>while(rs.next()){                           
    rs.put("Column1","Column2");
}
</code></pre>

<p>This is not right, could some explain the correct way to do it please?</p>
