Hashmap capacity, load factor and fail-fast

Capacity :

  •     Capacity is the Number of element HashMap can contain. 
  •     initial capacity is the capacity at the time the hash table is created 
  •     default initial capacity (16) 
  •     capacity increased (2 power n) , where n- number of elements
load factor :

  • Defines threshold of HashMap. When re-sizing will occur of HashMap.
  • The load factor is a measure of how full the hash table is allowed to get before its capacity is automatically increased.
  • default load factor (.75)
fail-fast :


  • The iterators returned by all of this class's are fail-fast
  •  After the iterator is created, if the map is modified at any time it will throw a ConcurrentModificationException

Comments

Popular posts from this blog

I get wrong characters when retreiving the message body of an email using TIdIMAP4.UIDRetrieveTextPeek2()

How to drop the all the 1's in a correlation matrix

Today Walkin 14th-Sept