Skip to Main Content

New to Java

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!

Can we sort an ArrayList using a Comparator ?

807597Aug 25 2004 — edited Jul 15 2008
I am stuck with a problem

I have a an ArrayList consists of small small ArrayLists. I want to sort this outer arraylist using a comparator

If i use Arrays.sort(...,this ) method it will not accept an arraylist

I must use the comparator for sorting
I have implemented this using other algorithms like bubble sort , quick sort etc but

how can i sort an Arraylist using comparator



Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 12 2008
Added on Aug 25 2004
15 comments
290 views