public class SortingDescending {
@SuppressWarnings("unchecked")
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int[] num = new int [10];
int count = 0;
while(count< num.length){
num[count]= input.nextInt();
++count;
}
TreeSet tree = new TreeSet() ;
for(int i = 0; i < num.length; i++){
tree.add(num[i]) ;
}
System.out.println (" The numbers of the array in descrending order are: " + tree.descendingSet() );
}
}
OtterBox Defender Case for iPhone 3G, 3G S (Black)