Sorting using Comparator in java with example. For sorting using Comparator interface we need to use Collections.sort(List list, Comparator c) method.