πŸ“Š JAVA
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
πŸ’¬ Discuss
βœ… Correct Answer: (C) Interface to compare two objects in java

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

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

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
333
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
85%
Success Rate