| Author |
Is there any sorting method in Java
|
Parshuram Walunjkar
Ranch Hand
Joined: Jan 02, 2002
Posts: 31
|
|
Hi all, Is there any sorting method in Java? Regards from parshuram Walunjkar
|
 |
Dirk Schreckmann
Sheriff
Joined: Dec 10, 2001
Posts: 7023
|
|
|
Collections.sort(List) can be used to sort the components of a List.
|
[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
|
 |
Michael Matola
whippersnapper
Ranch Hand
Joined: Mar 25, 2001
Posts: 1721
|
|
And similarly there's Arrays.sort() (variously overloaded) for arrays. (If it's an array of Objects you're sorting, you'll need to be aware of how the Comparable interface works.)
|
 |
 |
|
|
subject: Is there any sorting method in Java
|
|
|