package chapter6;

import java.util.TreeSet;

public class Example12 {
    public static void main(String[] args) {
        Student s1 = new Student("1", "张三");
        s1.setHeight(175);
        Student s2 = new Student("2", "李四");
        s2.setHeight(170);
        Student s4 = new Student("3", "王五");
        s4.setHeight(180);

        TreeSet<Student> students = new TreeSet<>();
        students.add(s1);
        students.add(s2);
        students.add(s4);

        System.out.println(students);
    }
}
