Difference between HashMap and HashTable

Tutorials Shared by the Internet Community

Advertisements


Difference between HashMap and HashTable

This question oftenly asked in interview to check whether candidate understand correct usage of collection classes and aware of alternative solutions

Statistics

  • Total Hits - 31538

  • Total Votes - 101 votes

  • Vote Up - 44 votes

  • Vote Down - 57 votes

  • Domain - javarevisited.blogspot.com

  • Category - JAVA/Collections

  • Submitted By - Javin Paul

  • Submitted on - 2011-02-05 08:21:15

Description

This question oftenly asked in interview to check whether candidate understand correct usage of collection classes and aware of alternative solutions available.

1. The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls. (HashMap allows null values as key and value whereas Hashtable doesn't allow nulls).    More detail...


Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements