title: How to compare two Hash Maps in Java
body: <p>Hi I am working with HashMap in java and i have a scenario where i have to compare 2 HashMaps</p>
  
  <pre><code>HashMap1:
  Key: BOF   Value: SAPF
  Key: BOM   Value: SAPM
  Key: BOL   Value: SAPL
  
  HashMap2:
  Key: BOF   Value: Data1
  Key: BOL   Value: Data2
  </code></pre>
  
  <p>And after comparing these two hashmaps my resulting hashmap will contain the Key as a Value of First HashMap1 and Value as a Value of second HashMap2.</p>
  
  <pre><code>HashMap3:
  Key: SAPF  Value: Data1
  Key: SAPL  Value: Data2
  </code></pre>