This interface extends Set and provides a total ORDERING of its elements.
The implementation class of the SortedSet interface has an implementation of the Comparable interface so that all the elements in the set can mutually comparable.
SortedSet by default do the sorting on ascending order.
TreeSet is an implementation of a sorted set interface.
Code Snippet: SortedSetsortedSet = new SortedSet();
NavigableSet:
NavigableSet is responsible for a navigable set in Java Collection Framework.
The NavigableSet interface inherits from the SortedSet interface.
It behaves like a SortedSet with the exception that we have navigation methods available in addition to the sorting mechanisms of the SortedSet.
For example, NavigableSet interface can NAVIGATE the set in reverse order compared to the order defined in SortedSet.
The classes that implement this interface are, TreeSet and ConcurrentSkipListSet