java排序 //排序 Collections.sort(list,new Comparator<Chat>(){ @Override public int compare(Chat o1, Chat o2) { // TODO Auto-generated method stub if(o1.getPubTime().getTime()>o2.getPubTime().getTime()){ return 0; }else{ return 1; } }