The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Sorting a LinkedList

Posted by Eduardo on November 06, 2001 at 6:25 PM

I have a LinkedList list containning numbers (long). I need to sort it in regular ascendent order, but looks like it doesn't take it as a number, giving me results like:

0, 0, 1, 10, 100, 2, 22, 245,...

Instead of:
0, 0, 1, 2, 10, 22, 100, 245,...

Does anybod has a solution for this mystery?

Thanks!



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us