Java tutorial
//package com.java2s; import java.util.Collections; import java.util.SortedSet; import java.util.TreeSet; public class Main { public static SortedSet reverseSortedSet(int[] ints) { TreeSet sortedSet = new TreeSet(Collections.reverseOrder()); for (int i = 0; i < ints.length; i++) { sortedSet.add(new Integer(ints[i])); } return sortedSet; } }