Pergunta de entrevista da empresa UKG

How HashMap works ?

Resposta da entrevista

Sigiloso

29 de jun. de 2015

Working of HashMap.. First of all we have to find out the hashCode of that object(Value), then this hashCode is divided by 16, because default array size is 16, then the remainder of that division will be the index of array where this value have to be placed. When the remainder of two values are same, then Linked List has generated at that array index. This is how HashMap works.