What is the function of the compare(T a, T b, Comparator c) method of the Objects class?

What is the function of the compare(T a, T b, Comparator<T> c) method of the Objects class?



Answer: Compares two objects of the same type, returning 0 if the arguments are equal or the result of c.compare(a, b) if not.


Learn More :

Data Structures

Learn More Multiple Choice Question :