Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can we sort an ArrayList in descending order?

807605Sep 3 2007 — edited Sep 3 2007
Hi guys
i have got a doubt. Please consider the following code. And obviiuosly the language is Java
ArrayList listSample = new ArrayList("5","7","2","3","6");
can anyone help me with how to sort this arrylist in descending order. and please note that i don want to use any other collection like SortedList or anything like that. please reply ASAP.....
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 1 2007
Added on Sep 3 2007
36 comments
600 views