Hi Nik,
1- Comparable interface is implemented my classes like
String, Integer, Double... Date etc. Comparable enables the objects of the class to be stored in the TreeSet or TreeMap like collection. There should be any way the collection could decide how to place the objects of that class in sorted order that we tell in the compare(...) method of the Comparable interface.
2- Comparator is useful when you need more that one sorting sequence; because you can only create one sorting sequence using Comparable; use can define various classes that implement Comparator interface and define the method compareTo() that takes two arguments.
You can be little specific to your question.
Thank God it is raining here!
Regards,
[ May 01, 2007: Message edited by: Chandra Bhatt ]