title: java how to combine two hashmap without duplicate entries
body: <p>I am trying to combine two different hashmaps. But in those two maps, there are some duplicate entries, so I have to remove thoese entries after combine. </p>
  
  <p>For example:  </p>
  
  <p>HashMap 1:<br>
  100  hello<br>
  101  nice  </p>
  
  <p>HashMap 2:</p>
  
  <p>100 hello<br>
  102 good  </p>
  
  <p>After combine, the hashmap should looks like:  </p>
  
  <p>100 hello<br>
  101 nice<br>
  102 good</p>
  
  <p>I have tried <code>putall</code>,but seems it does not remove duplicate entries. 
  Could someone help me on a fast way to do that? </p>