| Author |
HashMap - load factor ?
|
kri shan
Ranch Hand
Joined: Apr 08, 2004
Posts: 1303
|
|
|
HashMap's initial capacity assigns number of buckets. Whether load factor is number of elements in each bucket (or) HashMap expansion range?
|
 |
kri shan
Ranch Hand
Joined: Apr 08, 2004
Posts: 1303
|
|
|
Any update ?
|
 |
Stephan van Hulst
Bartender
Joined: Sep 20, 2010
Posts: 3065
|
|
|
What did the documentation say?
|
 |
kri shan
Ranch Hand
Joined: Apr 08, 2004
Posts: 1303
|
|
|
Document did not say anything
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16487
|
|
Well, that's odd. You must not have been reading the right documentation, because when I read the documentation it says this:
The load factor is a measure of how full the hash table is allowed to get before its capacity is automatically increased.
I don't know how you could have missed that, if you had seen the right documentation.
|
 |
kri shan
Ranch Hand
Joined: Apr 08, 2004
Posts: 1303
|
|
The load factor is a measure of how full the hash table is allowed to get before its capacity is automatically increased. Thanks Paul.
Then who(initial capacity/load factor/any other value) decides number of elements in each bucket ?
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16487
|
|
|
I don't understand what that question means. There isn't anything which says "There will be 47 entries in each bucket" or "There will be 19 entries in bucket number 7" or anything remotely like that. That just isn't how hashing works.
|
 |
 |
|
|
subject: HashMap - load factor ?
|
|
|