How would you sort a custom object using Priority Queue in Java?

By