HashMap working
1) Creates 16 linked lists in heap by default.
2) Load Factor:If a hashmap reaches 75% of its capacity the size of the hashmap doubles
the existing capacity this is done by load factor
3) Stores key value pairs where the key must be an object instead of primitive types. Then
JVM will get the hashcode of the key it will use the .hashCode() from the object class.
4) Using that hashCode the JVM finds the bucket index where the key value pair needs to
be stored
5) Hash Collision: When 2 keys generate the same hashCode and hence same bucket
index which makes JVM tries to add a key value pair to a bucket already having some
data is called hash Collision.
6) If hash collision happens 1st JVM will check if the keys are equal(only keys will be
checked) if they are equal that node will be overwritten to the new jay value since the
keys are the same hence not allowing duplicate keys. If the keys are unequal a new
node will be added to the linked list in the same bucket.