SUBSCRIBE HERE TO GET POST UPDATES VIA EMAIL :

Delivered by FeedBurner

  • 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 optional Map operations are also available.
  • It is non synchronized implementation so if any thread modifies map structurally when map is accessed by multiple threads then it must be synchronized externally.

  • 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 synchronized externally.
  • It does not guarantee of maintaining the map order.

  • 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 mappings.
  • Map will helps you when you wants to search, update or delete elements based on it's key.
  • The map interface is implemented by different java classes like HashTable, HashMap and TreeMap.