Pergunta de entrevista da empresa StoneX

How do you override the implementation of the put() method in Hashmap for duplicate keys?