A

Admin • 832.52K Points
Coach

Q. Which interface must be implemented to use custom ordering in PriorityQueue?

  • (A) Comparable
  • (B) Comparator
  • (C) Serializable
  • (D) Runnable
  • Correct Answer - Option(B)
  • Views: 16
  • Filed under category Java
  • Hashtags: Java Queue

Explanation by: Admin

A `Comparator` can be passed to a PriorityQueue for custom ordering.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.