🎴 Flashcard Mode
Java Programming: Exceptions, Collections, and Threading
Card1 / 20
Mastered0
Review0
QuestionClick to flip
Which interface does TreeMap class implement ?
AnswerClick to flip back
A
SortedMap
💡 Explanation:
TreeMap implements the SortedMap interface (and AbstractMap). It provides a red-black tree implementation of a Map that maintains its keys in sorted order. SortedMap is the interface that defines the contract for maps with sorted keys. Options A (Set), B (SortedSet), C (List), and D (Tree) are incorrect interfaces for TreeMap.