HashSet is under set interface i.e. it does not guarantee for either sorted order or sequence order.
We can add any type of elements to hash set.
TreeSet is under set i.e. it provides elements in a sorted order (acceding order).
We can add only similar types of elements to tree set.