Java HashMap Class

Is is pronounced as HashMap because It is hash table based implementation of map interface. It extends AbstractMap class and implements Map interface. It allows to store null key and null values. It is non synchronized implementation so if multiple threads accessing it concurrently and any one of them modifies it then it must be … Read more

Java Map Interface

Java Map interface represents the mapping between unique keys to values. Map can not hold duplicate values. In Map interface, Each key can map at most one value. Each Map interface provides three different collection views. Using which you can view map’s content as a set of keys, collection of values and set of key-value … Read more

Java Hashtable Class

Hashtable Class implements Map, Cloneable and Serializable interfaces and also extends Dictionary class. It maps keys to values in table format. Every key is linked to it’s value. In Hashtable, any object which is non null will be used as a key or it’s value. Initial capacity and load factor are two parameters of Hashtable … Read more

Java TreeSet Class

TreeSet is class under Set interface of collection framework. It implements NavigableSet interface which extends SortedSet interface. Elements are ordered by a Comparator which is provided at set creation time or by natural ordering. It maintains the ascending sorting order. TreeSet is not synchronized so if multiple threads accessing it concurrently and any one modifies set entry then … Read more