What sorting algorithm used while overriding compare method of comparator interface?
问题 Collections.sort(ar, new Comparator<Intervals>() { @Override public int compare(Intervals o1, Intervals o2) { return (Integer.valueOf(o1.getEnd())) .compareTo(Integer.valueOf(o2.getEnd())); } }); Hi all, I have the above code in java. Here, ar is a list and Intervals is a class with 2 integer variables : Start and End. I wanted to know what sorting algorithm is followed when we override the compare method of Comparator interface as above. I know, by default Collections.sort() and Arrays.sort(