Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HashMap and LinkedHashMap

 
S Majumder
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi exery body what is the difference between HashMap & LinkedHashMap ?

regards,
S
 
Muhammad Khojaye
Ranch Hand
Posts: 449
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please search. Surely, you will get many valuable replies.
 
Jitendra Takalkar
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HashMap is an implementation of Map interface. LinkedHashMap which extends HashMap i.e. implementation of Map interface. The differnce between the HashMap and LinkedHashMap is in the way of implementation of Hash table.

HashMap:
no guarantees as to the order of the map

LinkedHashMap:
it maintains a doubly-linked list running through all of its entries. This linked list defines the iteration ordering.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic