Explanation:This program is similar to the previous one but in this case a comparator for the TreeMap
instance is written. The default comparator does the sorting on the basis of natural ordering but the natural
ordering is reversed. This is quite clear from the output of the program.
18.10 HISTORICAL COLLECTION CLASSES
The historical collection classes are those classes supplied with the earlier version of Java. Though the
Collection Framework provides a number of classes which can be used in different programming situations,
at times one still needs to use some of the original collections capabilities. This ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.