Question: If you try to add an element using put ( ) method to a HashMap, and the key value exists, what happens to the HashMap?
If you try to add an element using put method to a HashMap, and the key value exists, what happens to the HashMap?
Group of answer choices
For an existing K corresponding V is updated.
For an existing K new V is added.
For an existing K corresponding V is deleted.
New KV is added.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
