看API文档就好了,两个的方法稍不同
Interface Comparable
Method Summary
int
compareTo(T o)
Compares this object with the specified object for order.
Interface Comparator
Method Summary
int
compare(T o1,
T o2)
Compares its two arguments for order.
boolean
equals(Object obj)
Indicates whether some other object is "equal to" this
comparator.