// 이렇게 써도 되긴 하는데 Set<Integer> set = new TreeSet<>(); // 이렇게 쓰면 .first(), .last() 라는 사기같은 메서드를 쓸 수 있다. TreeSet<Integer> set = new TreeSet<>();