摘要: 比较函数Java中,TreeSet和TreeMap都以排序的方式存储元素。具体事由比较函数精确定义排序次序的意义。定义一个Custom类public class Custom{ private String firstName; private String lastName; /** * Constructor * * @param firstName * @param lastName */ public Custom(String firstName, String lastName) { ... 阅读全文