Yes - the hashtable hashes the order
Best approach to this
1) Store in a vector
2) When you are done say
MyDataType[] SortedData = new MyDataType[MyVector.size()];
MyVector.copyInto(SortedData);
now store in the Hashtable and dump the vector if you need a hashtable
for fast lookup
At 10:33 AM 3/23/99 -0500, you wrote:
>I have a servlet that pulls demographic data rowsets (sorted alphabetically
>by last name) from a database. I then place information into a Hashtable()
>using last name as the key and vectors as the stored objects. When I pull
>out an Enumeration of the hashtable keys and then print them out they are
>not in the same order that I put them into the hashtable! I lose the alpha
>sorting from the original rowsets.
>
>Is there something in Enumeration that causes the keys to come out in any
>old order? Is there something in Hashtable? Is there a simple way to fix
>this?
>
>Darren
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
==============================================================
LordJoe - Java Training and Consulting
http://www.LordJoe.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html