File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
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?