← Quiz: HashMap and Maps: all 10 questions
Quiz: HashMap and Maps · Question 4 of 10
Which Map keeps its keys sorted?
Which Map keeps its keys sorted?
- A.HashMap
- B.LinkedHashMap
- C.TreeMap
- D.Hashtable
Answer & explanation
Correct answer: TreeMap
TreeMap is a red-black tree ordered by keys.
Can you get the rest right without peeking?
Take the timed Quiz: HashMap and Maps quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →