Re: sorting int[] in descending order



On Fri, 27 Oct 2006 16:20:23 +0100, Patricia Shanahan <pats@xxxxxxx> wrote:

2. Create an Integer array with the values from the int[] and
Arrays.sort it using a supplied Comparator that reverses the
a.compareTo(b) result.

If you choose to use this method you can make use of http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html#reverseOrder().

Dan.

--
Daniel Dyer
http://www.uncommons.org
.