Which interface does TreeMap class implement ?

  1. Set

  2. SortedSet

  3. List

  4. Tree

  5. SortedMap


Correct Option: E

AI Explanation

To answer this question, we need to understand the TreeMap class in Java.

The TreeMap class in Java implements the SortedMap interface.

The SortedMap interface is a sub-interface of the Map interface and extends it. It represents a map that is sorted according to the natural ordering of its keys or a custom Comparator.

Therefore, the correct answer is E) SortedMap.

Find more quizzes: