Check out the comparator interface.  It allows you to pass it a method
defining how the objects should be sorted and is designed to do what you
want.

Baldwin has a good tutorial on its use.
http://softwaredev.earthweb.com/java/article/0,,12464_879601,00.html

------ Original Message

on 13/11/2001 00:51, Basuki, Rendra at [EMAIL PROTECTED] wrote:

> Hi guys,
>
> Does anyone know how to sort a Hashtable just like the one in Array List? I
> need a hastable that contains a bunch of objects (can be string) that is
> sortable based on the value of the hashtable. Is there embedded methods such
> as in ArrayList.sort method?
>
> Thanks
> Rendra

___________________________________________________________________________
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

Reply via email to