package com.sf._01_treeset.demo2;

import java.util.TreeSet;

public class Test {
    public static void main(String[] args) {
        TreeSet<User> treeSet = new TreeSet<>();
        treeSet.add(new User("zhangsan",10));
        treeSet.add(new User("zhangsan1",20));
        treeSet.add(new User("zhangsan2",5));
        for (User user : treeSet) {
            System.out.println(user);
        }
    }
}
