- A
TreeSet
puts an element in natural ordering or by the provided comparator. - A
SortedSet
is also keeps the element in natural order
But what is the difference between them and NavigableSet?
Where are NavigableSets
useful?
Some example to show its usage would be nice for beginners.