The Map Interface contains the values on basis of keys it is pair of keys and values. It is known as an entry.it contains a unique key. It is useful to perform operations like search, update or delete elements on basis of the key.
The HashMap implements the map interface which allows storing key & value pairs where each key is unique. It can be easy to perform operations using a key index like update, delete, etc. it is non synchronized legacy Hashtable class.it allows storing one null element as well. It denoted as HashMap<K,V> ,where K=key & v=value.
The LinkedHashMap class is Hashtable & LinkedList implementation of Map interface, with iteration order.it inherits HashMap & implements the Map interface.
It contains value based on key & unique elements.it may have one null key & multiple null values.
The Red-black tree-based implementation is known as TreeMap. It has efficient means of storing key-value pairs in sorted order.
It contains a unique element.it is the value-based key that implements the NavigableMap interface & extends AbstractMap class. It will never contain a null key but it has multiple null values.
|HashMap can contain one null key.||TreeMap cannot contain any null key.|
|HashMap maintains no order.||treeMap maintains ascending order.|
The Hashtable maps keys to values.it inherits dictionary classes & implements the Map Interface. Hashtable is known as an array of lists. each list called a bucket. It has unique elements& doesn’t allow null value or key and it is synchronized.
The EnumSet is a specialized Set implementation for use with an enum type. The inherits AbstractSet class & implements the Set interface.
The EnumMap is a specialized Map implementation for the enum key.it inherits AbstractMap & Enum class.