•  Treeset is a type of set which implement navigable set,which is sub
    interface of sortset
  • Treeset is implemented based on balanced tree data structure.
  • Treeset does not allow duplicate object.but null insertion is allowed.
  • Does not preserve insertion order,object inserted according to sorting order
  • Treeset allow only comparable type object.
  • By default object are sorted in ascending order.

Treeset overload constructor

— Treeset(comparator c1)
— Treeset(sortedset c1)
— Treeset(collection c1)

Leave a Reply

Your email address will not be published. Required fields are marked *