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
Post a Comment