Vidyalelo
Java Programming · Q17

Java Collections Framework

Programming · Java Programming · question 17

Q17

What is the purpose of the `Comparator` interface in Java Collections Framework?

A.
It represents a generic collection
B.
It provides methods for hashing elements
C.
It defines a comparison function for ordering elements
Answer
D.
It represents a synchronized collection

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board