Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

TreeMap - uses

Chris JonesFeb 9 2012 — edited Feb 10 2012
Can someone give me an example of why you would use a TreeMap. If you have the key already why wouldnt use a HashMap which is O(1) instead of O(logn)?

Thanks

Chris
This post has been answered by Kayaman on Feb 10 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 9 2012
Added on Feb 9 2012
3 comments
182 views