Java Associate — Medium
Key points
- Comparable interface provides a way to define the natural ordering of objects.
- Comparator interface is used for custom sorting logic, not for the default sorting behavior.
- Sortable and Ordered are not standard interfaces in Java for sorting objects.
Ready to go further?
Related questions
