javajava 自定义类重写compare方法 ,使用Collections.sort排序 public class Bean implements Comparable { … … @Override public int compareTo(Bean_oneExp o) { if(this.timestamp != o.getTimestamp()){ return (int)(this.timestamp – o.ge……继续阅读 » wangting 7年前 (2017-07-27) 4340浏览 0个赞