Initial capacity in HashMap plays a vital role in the allocation of memory as we know that HashMap works on the key-value pair, that means the HashMap needed a large amount of memory to maintain the key and value, to overcome these challenges the HashMap works on the principal to allocate the optimum size, whenever the HashMap get instantiated, that is called Initial capacity, which is usually a 16. Now let’s focus on load factor, so there is a concept of threshold value, which is always a 0.75 size of the total capacity, the significance of this is whenever any new record gets inserted in the HashMap, the HashMap computes the allocated size of the HashMap, then it checks whether this size reaches the threshold value then HashMap increased the size of 75% from the current size to augmented the storage for next incoming record.