permaculture playing cards*
The moose likes Beginning Java and the fly likes Ordered Collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Ordered Collection" Watch "Ordered Collection" New topic

Ordered Collection

surendar prabu
Ranch Hand

Joined: Jul 24, 2006
Posts: 102
I need to maintain key-value pairs. I need to stre them in an ordered manner.say if i insert the elements as


I want to retrieve them in the same order as inserted. Also i dont want them to be sorted. I need only ordered key value pairs.
How can i achieve this?

Surendar prabu
[ August 01, 2007: Message edited by: surendar prabu ]

SCJP 1.4
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Check out the JavaDoc for LinkedHashMap.

Consultant, Sima Solutions
surendar prabu
Ranch Hand

Joined: Jul 24, 2006
Posts: 102
Thanks Merill. I have got what i needed.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Ordered Collection
Similar Threads
About using logic:equal
Getting session attributes
Problem in regular expression for matching
problem in writing Regular Expression
How to check against null