title: Java hashmap problem
body: <p>I would like to ask</p>
  
  <p>in Hashmap</p>
  
  <p>how can I count all the numbers if the element ID is same?</p>
  
  <p>Could anyone give some idea for me?</p>
  
  <p>Or just give some useful reference links for me to study</p>
  
  <p>thanks</p>
  
  <pre><code>import java.util.*;
  import java.util.Iterator;
  
  public class hash {
  
      public static void main(String[] args) {
  
          HashMap hashMap = new HashMap();
          hashMap.put("ABS", new Double(3434.34));
          hashMap.put("ABD", new Double(123.22));
          hashMap.put("ABD", new Double(123.22));
          hashMap.put("ABD", new Double(123.22));
          hashMap.put("ABD", new Double(123.22));
  
          Set set = hashMap.entrySet();
  
          Iterator i = set.iterator();
          while (i.hasNext()) {
              Map.Entry me = (Map.Entry) i.next();
              System.out.println(me.getKey() + " : " + me.getValue());
          }
  
  
      }
  }
  </code></pre>