Create TreeSet objects

TreeSet()
Creates a new, empty tree set, sorted according to the natural ordering of its elements.
TreeSet(Collection<? extends E> c)
Creates a new tree set containing the elements in the specified collection, sorted according to the natural ordering of its elements.
TreeSet(Comparator<? super E> comparator)
Creates a new, empty tree set, sorted according to the specified comparator.
TreeSet(SortedSet<E> s)
Creates a new tree set containing the same elements and using the same ordering as the specified sorted set.
Home 
  Java Book 
    Collection  

TreeSet:
  1. TreeSet class
  2. Create TreeSet objects
  3. Add elements to a TreeSet
  4. Get the least and greatest element in this TreeSet'>
  5. The first and last element in this TreeSet
  6. Get the head set and tail set
  7. Remove element from TreeSet
  8. Get the size of this TreeSet
  9. Get a subset from this TreeSet