// Collections.sort List list = new ArrayList(); Collections.sort(list, new Comparator() { public int compare(ObjectName o1, ObjectName o2) { return o1.toString().compareTo(o2.toString()); } }); //源代码片段来自云代码http://yuncode.net