Understanding Comparator Interface
Let's discuss the working of Comparator Interface.
One of the major drawbacks of using a Comparable interface is that the comparing logic gets fixed. For instance, if we have a Vehicle
class, then it can be sorted either on ...
Get hands-on with 1400+ tech skills courses.