ip_packet
asked on
Sort a list
Hi All,
I have a list of objects in random order.
The object details are as follows :
String ID
String totalAmount
How can I order by totalamount so that the object with greatest total amount appears at the beginning of the list and so on.
Thanks
I have a list of objects in random order.
The object details are as follows :
String ID
String totalAmount
How can I order by totalamount so that the object with greatest total amount appears at the beginning of the list and so on.
Thanks
base on an object's member
http://www.velocityreviews.com/forums/t143977-sorting-list-based-on-objects-members.html
http://www.velocityreviews.com/forums/t143977-sorting-list-based-on-objects-members.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, ;-)
One thing, I neded to add a return statement to the compare method
>>One thing, I neded to add a return statement to the compare method
is this question? I don't know what you meant by that
is this question? I don't know what you meant by that
http://www.javaworld.com/javaworld/jw-12-2002/jw-1227-sort.html?page=1