tag:blogger.com,1999:blog-8497700570844644232.post5223488408953783693..comments2023-05-26T13:23:49.036+05:30Comments on Programming For Future: Using comparable and comparator in java collectionUnknownnoreply@blogger.comBlogger1125tag:blogger.com,1999:blog-8497700570844644232.post-57554310662956065462011-06-19T09:28:36.186+05:302011-06-19T09:28:36.186+05:30while using comparable interface in Java and overr...while using comparable interface in Java and overriding compareTo method its worth noting that compareTo must be compatible with s<a href="http://javarevisited.blogspot.com/2011/02/how-to-write-equals-method-in-java.html" rel="nofollow"> equals method in Java </a> i.e. if two objects are equal via equals method compareTo method must return "0" for them, failing this may result in some JP@classpath java tutorialhttp://javarevisited.blogspot.com/2011/01/how-classpath-work-in-java.htmlnoreply@blogger.com