HashTable in Java is a type of Collections framework which is used to store and manipulate the group of objects. It is an array of the list in java (known as a bucket) which is used to implement a hash table, which maps keys to values. Hashtable contains unique elements. The initial default capacity of the Hashtable class is 11and doesn’t allow null keys and values.
Java Hashtable class implements the hashtable, which maps keys to the values. It inherits the Dictionary class and implements the Map interface. If we want to store and retrieve objects from a hashtable successfully, the objects used as keys must implement a hashCode method and the equals method.
#java #hashtable #hashmap