Should a custom Java HashMap size be used? -
I am working on a Minecraft PvP mod and a Hashup to store every player's name with my team I want to use. They will have a total of 64 players in a match and at one time there will be only 1 match on the server.
Do I have to use Hashp that is 64 slots? I had a very bad time in the past that I understand how it works, I am starting it right now.
No, if the Because you want to specify in the initial capacity, in fact only if you already know that you are going to fill it with at least a few entries, so that it will be re- Sharing and re-assigning will have to be above. In short: If you leave only hashmap default to 0.75, keep your load factor automatically The size will increase if you do not specify anything even if you do not explicitly do anything about it, then when you do not use all 64 entries then your
hashmap < / Code> will increase as much as you organize it.
Hashmap leaving your code, then this is usually OK. :)
Comments
Post a Comment