This week's giveaways are in the MongoDB and Jobs Discussion forums. We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line! See this thread and this one for details.
Collections.sort(ArraytoSort) This wil sort the arraylist of strings in their natural order.
If you want to sort your own objects in JAVA you have to define your own Comparable interface which can sort over different columns because you have to define your own CompareTo method.
If you have different ways of sorting the best way is to define a Comparator so you can do the sorting with different Comparators.
If the data retrieval is from one table of the database you can choose to do a data retrieval with each new sort order. This would be a performance issue if the dataretrieval is complex and you have to go everytime to the database.