LinkedHashSet

  • The underlying data structure is linkedlist + Hashtable
  • No duplicates
  • Insertion order is preserved
  • Serializable and Clonable
  • Constructor and methods are exactly the same as HashSet
  • Introduced in version 1.4

Example :

Note : In general we can use linked hash set to develop cache based application where duplicates are not allowed and insertion order is preserved.

Leave a Comment