2013年8月31日
摘要: 主要是实现Comparator接口数组排序: //按最后更新时间降序排列,时间相同的按照文件名生序排列 Arrays.sort(files, new Comparator() { public int compare(File f1, File f2) { if (f1.lastModified() > f2.lastModified()) { return -1; } else if (f1.las... 阅读全文
posted @ 2013-08-31 09:26 小计天空 阅读(356) 评论(0) 推荐(0) 编辑