What's the difference between a hashtable and a hashmap?



What's the difference between a hashtable and a hashmap?..

Answer / Anup Kumar Pandey

HashTable and HashMap are essentially the same data structure, with HashMap being a generic version of HashTable that can store key-value pairs instead of just keys. Both use a hash function to map keys to indices in an array for faster access.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

Is treeset synchronized?

1 Answers  


Is collection a class or interface?

1 Answers  


Why quicksort is better than merge sort?

1 Answers  


Does hashmap preserve insertion order?

1 Answers  


What is arraylist load factor?

1 Answers  


Does hashmap sort automatically?

1 Answers  


What do you mean by secondary clustering?

1 Answers  


Which data structure is used to perform recursion?

1 Answers  


What is indexing an array?

1 Answers  


What is the difference between 1d and 2d array?

1 Answers  


What is copyonwritearraylist?

1 Answers  


What is stack push?

1 Answers  


Categories