--Java 中 Comparable 接口的意义和用法.
【实现Comparable接口并重写compareTo方法】
[url]http://blog.csdn.net/nvd11/article/details/27393445[/url]
【实现Comparable接口并重写compareTo方法】
public int compareTo(Object o){
Student s = (Student)(o);
return this.ranking - s.ranking;
}
[url]http://blog.csdn.net/nvd11/article/details/27393445[/url]