实现Comparator接口,重写compare()方法 int compare(Object obj1,Object obj2); obj1 < obj2:返回负整数 obj1 > obj2:返回正整数 obj1 == obj2:0