Sorting contents of a java.util.LinkedList?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   John_McCauley
Posted On:   Saturday, April 5, 2003 12:14 PM

Hi,

I have a LinkedList object that contains Strings, is there a way I can sort the contents of the LinkedList? I have tried using the...


Collections.sort(myLinkedList)


... but this only seems to work for a List object.


John

Re: Sorting contents of a java.util.LinkedList?

Posted By:   Jeanne_Boyarsky  
Posted On:   Saturday, April 5, 2003 02:35 PM

LinkedList does implement the List interface. The Collections sort method should work.
About | Sitemap | Contact