aspose file tools*
The moose likes Java in General and the fly likes Is there any sorting method in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Is there any sorting method in Java" Watch "Is there any sorting method in Java" New topic
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: 1749
    
    2
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.)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is there any sorting method in Java