Look in the Jakarta Commons Collections library.  This is exactly what the 
SequencedHashMap class does.

> -----Original Message-----
> From: Lakshmeenarayana G G [mailto:[EMAIL PROTECTED]]
> 
> Hi,
> 
> I am using Hashtable or HashMap to keep Key-Value pair of elements.
> But When I add them, The Hashtable or HashMap gets sorted 
> depending on the
> keys.
> I want to retain the order in which I have added the key-value pair.
> Is there anyway to do it with Hashtable or HashMap ?
> 
> Or Can I use any other Collection type which will have the mapping of
> key-value which is not sorted other than two dimensional Array.

==========================================================================To 
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to