[java]代码库
package TREE;
import java.util.Collection;
import java.util.Iterator;
import java.util.TreeSet;
public class Map {
public static void main(String[] args) {
// TODO Auto-generated method stub
TreeSet tmap = new TreeSet();
tmap.add(new Person_JavaBean("张三","22","2019406"));
tmap.add(new Person_JavaBean("李四","20","2019479"));
tmap.add(new Person_JavaBean("王五","21","2019523"));
tmap.add(new Person_JavaBean("马六","23","2019801"));
tmap.add(new Person_JavaBean("陈七","25","2019345"));
System.out.println(tmap);
}
public static void print (Collection c) {
Iterator iter = c.iterator();
while(iter.hasNext()) {
Object obj = iter.next();
System.out.println(obj);
}
}
}