Reputation: 1191
When a hash map is initialised, 16 slots are created. All the them are empty in the beginning. Load factor is the ratio of number of elements occupied to the size of the hash map. So the default or initial load factor must be 0 right? But while referring the java book by deitel and deitel it says the default load factor is 0.75. How is that possible?
Upvotes: 0
Views: 55
Reputation: 279970
From the javadoc
The load factor is a measure of how full the hash table is allowed to get before its capacity is automatically increased.
It's a threshold.
Upvotes: 1