Results 1 to 4 of 4
- 01-13-2011, 05:31 PM #1
Member
- Join Date
- Jan 2011
- Posts
- 30
- Rep Power
- 0
-
You could create and use a Comparator object to sort the array in the opposite order. Have a look at the Comparator<T> API. Its use is similar to Comparable except that you need a compare method that takes two parameters rather than a compareTo method that takes one. If after you give it a try it doesn't work, come back with your code and any error messages and we'll likely be able to help you.
- 01-13-2011, 05:50 PM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,375
- Blog Entries
- 7
- Rep Power
- 17
When people rob a bank they get a penalty; when banks rob people they get a bonus.
- 01-13-2011, 06:07 PM #4
Member
- Join Date
- Jan 2011
- Posts
- 30
- Rep Power
- 0
Similar Threads
-
arrange(java.lang.String[][]) in Test cannot be applied to (java.lang.String) arrange
By prizzly in forum New To JavaReplies: 4Last Post: 01-01-2011, 10:52 AM -
[SOLVED] Sorting array in descending order?
By dan0 in forum New To JavaReplies: 14Last Post: 04-16-2009, 12:19 AM -
Sorting in descending order
By santanu in forum New To JavaReplies: 6Last Post: 11-26-2008, 11:43 PM -
Descending order
By santanu in forum New To JavaReplies: 1Last Post: 11-04-2008, 04:33 PM -
Display the data in Descending order
By santanu in forum New To JavaReplies: 2Last Post: 10-31-2008, 12:06 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks