Comparable vs. Comparator in Java

I have seen classes which implement both Comparable and Comparator. What does this mean? Why would I use one over the other?.



 
Post a Reply
Captcha Image