Link to home
Start Free TrialLog in
Avatar of ip_packet
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
Avatar of ysnky
ysnky
Flag of Türkiye image

ASKER CERTIFIED SOLUTION
Avatar of mnrz
mnrz

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ip_packet
ip_packet

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