wood burning stoves*
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 Java 8 in Action this week in the Java 8 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
How can I set the color of the message validation
this are not dumb questions (for me)
Green Horn !*/? Ranch Hand!!!??
WA #1.....word association
how to get a seesion object without using cookie?