Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

treeset java descending order using comparator

TreeSet<Integer> set = new TreeSet<Integer>(new Comparator<Integer>()
  {
  public int compare(Integer i1,Integer i2)
        {
        return i2.compareTo(i1);
        }
  });
 
PREVIOUS NEXT
Tagged: #treeset #java #descending #order #comparator
ADD COMMENT
Topic
Name
1+1 =