Skip to Main Content

Java Programming

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!

Java hash code with long strings

807580Feb 17 2010 — edited Feb 17 2010
Hi
I have a set of 6 keys that are represented by a string but with long length such like 20 character each string .
I want to save these 12 keys as one key in HashMap is it recommended to concatenate all the string and put it as a key in the map ,I think itÂ’s not good
Because there is a big overhead of performance while calculation the hash code method ,can any one please suggest how java can deal with this issue

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 17 2010
Added on Feb 17 2010
18 comments
2,344 views