What happens when a key-value pair already exists in the Map and we use put() to add the value associated with the same key?
It adds one more key-value pair of the same key.
It adds 2 values for the same key
It throws an error
It replaces the pre-existing value.
This question is part of this quiz :
HashMap and LinkedHashMap CIP