posted 20 years ago
Hello all,
Whats the difference between the Comparable interface and the Comparator interface apart from the presence of equalsTo() method and the difference of names (compare() & compareTo()).
What i understand is basically both these interfaces are meant for the same purpose. For instance if i need to sort an Array of Custom Objects i can use any of these interfaces.
Are there any basic differences between these 2 interfaces?
Regards,
Sajee