treeset java descending order using comparator

Solutions on MaxInterview for treeset java descending order using comparator by the best coders in the world

showing results for - "treeset java descending order using comparator"
Simon
15 Jun 2020
1TreeSet<Integer> set = new TreeSet<Integer>(new Comparator<Integer>()
2  {
3  public int compare(Integer i1,Integer i2)
4        {
5        return i2.compareTo(i1);
6        }
7  });
similar questions