JAVA排序

 实现implements Comparable
 
public int compareTo(Object o){
   I7011 i7011 = ( I7011)o;
  
   int i = i7011.creatTime.compareTo(this.getCreatTime());
  
   return i;
  }
 
 Collections.sort(this.viewList);

你可能感兴趣的:(java)