重写Collections实现自定义排序

Collections.sort(List<Object>, new Comparator<Object>() {
public int compare(Object o1, Object o2) {
return o1.getSort().compareTo(o2.getSort());
}
});
Collections.sort(articles, new Comparator<Article>() {
public int compare(Article kf1, Article kf2) {
  return kf1.getSort().compareTo(kf2.getSort());
}
});
上一篇:网络A、B、C类IP地址的区别


下一篇:oracle11g 卸载和安装(win7,32位)