R

Ram Sharma • 193.86K 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: 282
  • Filed under category JAVA

Explanation by: Team MCQ Buddy
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.


Question analytics