> For the complete documentation index, see [llms.txt](https://hanfak.gitbook.io/workspace/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hanfak.gitbook.io/workspace/languages/java/intermediate/collections/linked-hashmap.md).

# LinkedHashMap

* implementation of Map interface, subclass of HashMap
* ordered
  * maintains the insertion order of elements by using a doubly linked list running through the elements.
* rely on hashCode and equals to determine uniquekeys.
* not as costly as the usage of a TreeMap.
* neither the insertion order nor the access order will matter to the users of a Map
* Very rare cases to use this collection&#x20;
