Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8683211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:58:45+00:00 2026-06-12T21:58:45+00:00

Can anyone help me to figure out difference between SortedMap, CheckedSortedMap, synchronizedSortedMap. I am

  • 0

Can anyone help me to figure out difference between
SortedMap, CheckedSortedMap, synchronizedSortedMap.
I am really have trouble in making decision which one to use when?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T21:58:47+00:00Added an answer on June 12, 2026 at 9:58 pm

    SortedMap is an interface that is a Map(key-value pairs) with an added contract of being ordered in some defined manner on its keys. Owing to that ordering of keys SortedMap has extra methods like SortedMap<K,V> subMap(K fromKey, K toKey), SortedMap<K,V> headMap(K toKey) ... which ‘normal’ Maps dont have. If you iterate a keyset of a sortedMap you will find a definite order.

    A Treemap is an implementation of that interface. If you are creating a new SortedMap object by yourself, its almost always go for TreeSet.

    For checkedSortedMap or any other Collections.checkedXXX() methods, Here is a fine discussion on what they all are for: What is the Collections.checkedList() call for in java?

    Classes in Collections framework are not synchronized by default. For Maps it means that if you have a map that is shared between two or more threads and one is doing a put(A, value) and another thread is also calling put(A, othervalue) at the same time on the map, strange things can occur. Collections.synchronizedSortedMap(sortedMap) method gives a synchronized map that wraps the given map and with proper locking mechanisms in place.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone help me figure out whats wrong with this piece of xaml code?
Can anyone help, i trying to figure what i need to do, i have
Can anyone help me with this: I'm trying to figure out how to copy
Can anyone help me figure out how to search a URL and print a
I am new to struts and spring security. Can anyone help me to figure
Can anyone help me with this: I have calculated 2 different values: standard deviation
I have a routing problem and I can't figure out how to solve it.
Can anyone help - this is driving me mad. I am calling a mysql
Can Anyone help me why x2 prints zero. I guess because of floating point
Can anyone help me how to split /explode verse format to 3 parts? The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.