Question: what is the difference between treeset and sortedset?
Answer: SortedSet is an interface (it defines the functionality) and Treeset is an implementation. NavigableSet is also an interface subtype of the SortedSet.