What is the function of the sort(List<T> list, Comparator<T> comparator) method of the Collections class?
Answer: Sorts the order of the list according to the provided Comparator object whether the list elements implement the comparable interface or not.
If the answers is incorrect or not given, you can answer the above question in the comment box. If the answers is incorrect or not given, you can answer the above question in the comment box.