A

Admin • 828.03K Points
Coach

Q. Which interface must be implemented to customize sorting in TreeSet?

  • (A) Comparator
  • (B) Comparable
  • (C) Iterable
  • (D) Listable
  • Correct Answer - Option(A)
  • Views: 11
  • Filed under category Java
  • Hashtags: Java Set

Explanation by: Admin
TreeSet uses the Comparator interface to define custom sorting logic.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.