By spm2ot
via sites.google.com
Published: Jun 19 2012 / 17:54
Surprisingly often, I see code like HashMap> mapJdK = new HashMap>(); and in principal it is valid Java code, but the hash map is not initialized with a reasonable values. In this case the Java implementation has to resize the number of buckets with increasing number of data in the hash map. In Java the default load factor is 0.75 and the default initial capacity of a hash map is 16. This means that the threshold for the next resize equates like...
Add your comment