Is HashMap in Java collision safe

Posted by changed on Stack Overflow See other posts from Stack Overflow or by changed
Published on 2009-11-15T21:46:22Z Indexed on 2010/05/04 3:48 UTC
Read the original article Hit count: 185

Filed under:
|
|

Hi

I am developing a parser that needs to put key value pairs in hashmap.

But a key can have multiple values which i can do in this way

HashMap<String,ArrayList<String>> .

But what happens if number of keys are very large and it start matching with other key's hashcode.

Will that rewrite previous key's value ?

thanks

-devSunday

© Stack Overflow or respective owner

Related posts about java

Related posts about collections