java - Why was hashcode designed to return int -


this question has answer here:

it seems hashcode returns int. appears limiting factor due intmax. 1 can argue such never have many objects, cause heap overflow etc. if chose double instead of int guarantee larger extent hashcode wont unique distinct objects ?

hashcodes don't need unique. that's why hashcodes. use in hashing algorithms. don't need unique keys.


Comments

Popular posts from this blog

iphone - Three second countdown in cocos2d -

hyperlink - how to do url routing in php -

c - Avoiding Extra Malloc in Linked List (node->next = NULL) -