java集合框架

Comparable & Comparator

巴蜀人在紫荆 posted @ 2013年4月24日 15:42 in java编程 , 581 阅读

comparable & comparator之区别联系:

http://www.digizol.com/2008/07/java-sorting-comparator-vs-comparable.html

 


	
public interface Comparable<T> {
 public int compareTo(T o); 
}

 

public interface Comparator<T> {
    public int compareTo(T o);
    public boolean equals(Ojbect o);
}

 

 


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter