Example for a class implementing comparable interface in Java
When you need some sort of ordering for the classes which you define, you will be going either for a comparable or comparator interface. Consider this example package test; import java.util.*; public class TreeSetTest {private static Set s = new TreeSet ....