How can i combine two hashMap objects of same type in Java
<p>I have two HashMaps defined like so:</p>

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

<p>Also, I have a 3rd HashMap Object:</p>

<pre><code>    HashMap&lt;String, Integer&gt; map3;
</code></pre>

<p>How can I merge map1 and map2 together into map3?</p>
