摘要: 1.自然排序2.存储对象对象实现Comparable接口 1 import java.util.Iterator; 2 import java.util.TreeSet; 3 4 public class TreeSetDemo { 5 public static void main(String[] args){ 6 TreeSet<Student> ts =new TreeSet<Student>(); 7 ts.add(new Student(21,"zhangsan")); 8 ts.add(new Student(29,"li.. 阅读全文
posted @ 2012-07-07 01:31 Carve_Time 阅读(232) 评论(0) 推荐(0) 编辑