This week's book giveaway is in the Game Development forum.
We're giving away four copies of Badass: Making Users Awesome and have Kathy Sierra on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes difference between sortedmap and treemap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "difference between sortedmap and treemap" Watch "difference between sortedmap and treemap" New topic

difference between sortedmap and treemap

Chris Davies
Ranch Hand

Joined: Feb 26, 2003
Posts: 110
what is the difference betwen these two interfaces ?

is it the same as sortedet and treeset ?

both seem to sort in order ? is it the key /value issue ?



One day all greenhorns will run free ...
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
It looks to me that TreeMap is an implementation of the interface SortedMap. (As TreeSet is an implementation of SortedSet). So a comparison seems to be meaningless.

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
I agree. Here's the link:
subject: difference between sortedmap and treemap