This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 1746
    
    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.)
 
 
subject: Is there any sorting method in Java
 
Similar Threads
question on array and printing
Give any link for sorting method
collection to string array possible!
sorting a vector
Give any link for sorting method