SortedMap comparator() method in Java with Examples
The comparator() method of java.util.SortedMap interface is used to return the comparator used to order the keys in this map, or null if this map uses the natural ordering of its keys.Syntax: public Comparator comparator() Return Value: This method returns the comparator used to order the keys in th