Which statement is TRUE about Comparator in Java?

Last Updated :
Discuss
Comments

Which statement is TRUE about Comparator in Java?

A comparator is used to define the natural ordering of objects.

Comparator is implemented inside the class itself.

Comparator can be used to define multiple sorting orders.

Comparator can only sort Strings.

Share your thoughts in the comments