Ask Question
31 August, 15:23

What is the difference between a TreeSet and a TreeMap?

+5
Answers (1)
  1. 31 August, 15:31
    0
    Answer: TreeSet and Treemap has the following differences : -

    TreeSet is used for the implementation of the Set interface while TreeMap are used for invoking of the interface of the map. Duplicate object values are not present in the TreeSet but TreeMap has the ability to have the duplicate object values. TreeSet comes in the order of sorted objects while TreeMaps have sorted keys. TreeMap has the storage of the single object values while Treemap can store object values as well as keys.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “What is the difference between a TreeSet and a TreeMap? ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers