Link Details

Link 808605 thumbnail
User 412017 avatar

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...
  • 9
  • 0
  • 2596
  • 1884

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (9)



Voters Against This Link (0)



    Java EE7
    Written by: Andrew Lee Rubinger
    Featured Refcardz: Top Refcardz:
    1. Design Patterns
    2. OO JS
    3. Cont. Delivery
    4. CI Patterns
    5. CI Tools
    1. Spring Integration
    2. Git
    3. Regex
    4. Java
    5. REST