Does hashmap allow duplicate keys?



Does hashmap allow duplicate keys?..

Answer / Sunil Kumar

No, a HashMap does not allow duplicate keys. If you attempt to add a key that already exists, it will overwrite the existing value.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

What is the time complexity of arrays sort?

1 Answers  


Define separate chaining?

1 Answers  


If you are given a choice to use either arraylist and linkedlist, which one would you use and why?

1 Answers  


How to get top two numbers from an array?

1 Answers  


Can arraylist have duplicates?

1 Answers  


What is the difference between arraylist and hashmap?

1 Answers  


What is dynamic data structure?

2 Answers  


What is a threaded binary tree? Explain its operation with example?

1 Answers  


Can you please explain the difference between array_name and &array_name?

1 Answers  


What is the minimum number of nodes that a binary tree can have?

1 Answers  


Define splay tree?

1 Answers  


Why do we use stacks?

1 Answers  


Categories