title: how to merge more than one hashmaps also sum the values of same key in java
body: <p>ı am trying to merge more than one hashmaps also sum the values of same key, 
  ı want to explain my problem with toy example as follows</p>
  
  <pre><code>    HashMap&lt;String, Integer&gt; m = new HashMap&lt;&gt;();
      HashMap&lt;String, Integer&gt; m2 = new HashMap&lt;&gt;();
  
      m.put("apple", 2);
      m.put("pear", 3);
      m2.put("apple", 9);
      m2.put("banana", 6);
  </code></pre>
  
  <p>ı tried putall </p>
  
  <p>m.putAll(m2);</p>
  
  <p>output is as follows
  {banana=6, apple=9, pear=3}</p>
  
  <p>but its result is not true for this problem.
  ı want to output as</p>
  
  <p>{banana=6, apple=11, pear=3}</p>
  
  <p>how can ı get this result in java?</p>