title: What is the best way to iterate two hashmap in same loop in java?
body: <p>What's the best way to iterate over the below two maps together? I want to compare two maps values which are strings and have to get the keys and values.</p>
  
  <pre><code>HashMap&lt;String, String&gt; map1;
  HashMap&lt;String, String&gt; map2;
  </code></pre>