摘要:
用Collections.sort方法对list排序有两种方法第一种是list中的对象实现Comparable接口,如下:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--/***根据order对User排序*/publicclassUserimplementsComparableUser{privateStringname;privateIntegerorder;publicStringgetName(){returnname;}publicv 阅读全文