사실 사용법이라기 보다는, TreeSet을 사용할 때 유의할 점 정도가 맞겠다. HashSet을 사용하기 위해서는 HashSet에 들어가는 원소의 equals() 함수와 hashCode() 함수를 각각 override해줘야 한다. 그럼 TreeSet을 사용하기 위해서는? Oracle이 제공하는 Java Doc 문서를 살펴보면, 다음과 같이 나와있다. This is so because the Set interface is defined in terms of the equals operation, but a TreeSet instance performs all element comparisons using its compareTo (or compare) method, so two elements that ..