Which collection class maps keys to values and maintains the keys in their natural sorted order?

Choose the correct answer

Explanation

java.util.TreeMap is a collection class that stores key-value pairs and keeps the keys sorted according to their natural ordering. Unlike LinkedList, SortedSet, and HashSet, TreeMap maintains a sorted order of keys, enabling efficient retrieval based on key order.

Which collection class maps keys to values and maint… — Java concepts and its programming | PakQuizHub