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 Sort song titles 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 "Sort song titles" Watch "Sort song titles" New topic
Author

Sort song titles

Cynthia Yeo
Greenhorn

Joined: Feb 13, 2003
Posts: 3
how can i sort the titles of the songs in descending order by using String.comparTo() method?
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Collections.sort(songs, Collections.reverseOrder());
Assuming that "songs" is a List of song titles or Song objects that have a sensible natural ordering. If not, then please tell us a bit more about your problem.
- Peter
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sort song titles
 
Similar Threads
this are not dumb questions (for me)
WA #1.....word association
How can I set the color of the message validation
how to get a seesion object without using cookie?
Green Horn !*/? Ranch Hand!!!??