Java, Spring, Microservices, Interview, Coding.
the key class always returns “5”. This effectively means, calculated hash value, is same for all the entries inserted in the HashMap. Thus all the entries are stored in the same bucket. Second thing, a HashMap implementation does use equals() method to see if the key is equal to any of the already