| TreeSet | HashSet | LinkedHashSet | 
| public class TreeSetextends AbstractSetimplements SortedSet, Cloneable, Serializable
 | public class HashSetextends AbstractSetimplements Set, Cloneable, Serializable
 | public class LinkedHashSetextends HashSetimplements Set, Cloneable, Serializable
 | 
| unique values | unique values | Unique values | 
| It stores its elements in a red-black tree | It stores its elements in a hash table | is implemented as a hash table with a linked list running through it | 
| Order : ascending order | undefined | insertion order | 
| Performance : Slow | better than LinkedHashSet | has fast adding to the start of the list, and fast deletion from the interior via iteration | 
| operations ( add,removeandcontains) | operations (add, remove, contains and size) | operations (add, contains and remove) | 
| add, addAll,ceiling,clear,clone,comparator,contains, descendingIterator,descendingSet,first,floor,
 hashSet,higher,isEmpty,iterator,last,lower,pollFirst,
 remove,size,subSet,tailSet
 | add, clear, clone, contains, isEmpty,iterator, remove, size | add, clear, clone, contains, isEmpty,iterator, remove, size | 
| From AbstractSet: 
 equals, hashCode, removeAll | equals, hashCode, removeAll | equals, hashCode, removeAll | 
| containsAll, retainAll, toArray, toArray,toString | AbstractCollection: 
 addAll, containsAll, retainAll, toArray,toArray, toString | addAll, containsAll, retainAll, toArray,toArray, toString | 
| Set: 
 containsAll, equals, hashCode, removeAll,retainAll, toArray, toArray | addAll, containsAll, equals, hashCode,removeAll, retainAll, toArray, toArray | add, addAll, clear, contains, containsAll,equals, hashCode, isEmpty, iterator, remove,removeAll, retainAll, size, toArray, toArray |