LinkedHashSet

Problem statement: what do you mean by LinkedHashSet in collection?
  1. LinkedHashSet is the child class of HashSet
  2. Introduced in 1.4 version
  3. LinkedHashSet is exactly same as HashSet except the following difference
  • HashSet:
  1. The underlying data structure is Hashtable
  2. Insertion order is not preserved
  3. Introduced in 1.2 version
  • LinkedHashSet:
  1. The underlying data structure is Hash table + Linked List(this is hybrid data structure)
  2. Insertion order is preserved
  3. Introduced in 1.4 version

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation