What is TreeMap?

1 Like

This class is used to store the elements in the form key value pairs. The keys cannot be duplicated where as the values can be duplicated. This class is a not synchronized. This class will store the element in the sorted (natural) order sorted based on the keys.