HashMap holding duplicate keys
问题 While experimenting with HashMap , I noticed something weird. Ran 4 threads with each trying to put (key,value) with keys from 0 to 9999, value a constant string. After all threads were done, map.size() returned a value greater than 10,000. How did this happen? Does this mean that the map contains duplicate keys? I iterated on the map.entrySet() and found that the count for some keys were indeed more than 1. What value would be returned if I do a get() on the map for one such key. Here is the