@w1024020103
2017-01-26T08:44:58.000000Z
字数 788
阅读 619
bittiger java data structure
Comparable?
Comparator
Comparable
public class Employee implements Comparable<Employee> {String name;int age;@Overridepublic int compareTo(Employee that) {return
public class AgeComparator implements Comparator<Employee> {@Overridepublic int compare(Employee e1, Employee e2)return e1.getAge() - e2.getAge();}
An anonymous function -- no name, in-line
