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 6843017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:10:22+00:00 2026-05-27T00:10:22+00:00

Is there an implementation of the java Map interface which utilizes separate chaining as

  • 0

Is there an implementation of the java Map interface which utilizes separate chaining as collision resolution. By reading the javadocs for HashMap and HashTable I came to the conclusion that what the implementation does is basically replace the value and essentially doesn’t employ any collision resolution?

  • 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-05-27T00:10:22+00:00Added an answer on May 27, 2026 at 12:10 am

    You got it wrong: it uses a linked list of entries for each bucket.

    When putting a value in the map, the map starts by calling hashCode on the key, then transforms this hash code so that it’s between 0 and the number of buckets. If the bucket is empty, the key is stored in this bucket. If it’s not, then every key in this bucket is compared to the new key with equals. If one is equal, then its value is replaced by the new value. Else, a new entry with the new key is added to the bucket’s list of entries.

    If you want to store multiple values for a given key, then use a Map<Key, List<Value>>, or use Guava’s MultiMap.

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

Sidebar

Related Questions

Is there some implementation of java.util.Map that does not uses HashCode? I have the
Is there an implementation of java.util.Map that only allows a value to be read
Is there an openID implementation in Java? I would like to use this in
The (very outdated) page for LZO contains a link to a Java implementation. There
There seems to be a bug in the Java varargs implementation. Java can't distinguish
Is there any other implementation (e.g. in an OSS project) of a Java SecurityManager
Is there a standard Java (1.5+) implementation (i.e. no 3rd party) of a collection
Is there any kind of native map implementation in delphi 6 (map keys to
Possible Duplicate: Where do I find a standard Trie based map implementation in Java?
I was looking for a bidirectional map implementation in Java, and stumbled upon these

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.