A

Admin • 830.13K Points
Coach

Q. What is a comparator in Java?

  • (A) Interface to compare integer
  • (B) Comparison method for lists
  • (C) Interface to compare two objects in java
  • (D) All of these
  • Correct Answer - Option(C)
  • Views: 17
  • Filed under category Java
  • Hashtags:

Explanation by: Admin
Java Comparator interface is used to order the objects of a user-defined class.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.