LinkedHashMap Class In Java

LinkedHashMap class is one of the class of map interface which extends HashMap class and implements Map interface. It is combination of linked list and Hash table implementation of the Map interface and that’s why it is called LinkedHashMap. It is maintaining doubly-linked list insertion order in which keys were inserted into the map. It allows to store null elements and … Read more

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 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

HashSet in Java Collection Example

HashSet is a class of collection framework which extends AbstractSet class and implements the Set interface. HasSet doesn’t guarantee that elements order will remain same over the time and returned in any random order. HasSet doesn’t allow duplicate values. If you try to insert duplicate, It will overwrite. HasSet allows to store null values. HasSet … Read more