Hi,
I have used HashMap in my program.I need to know the capacity of the HashMap.
Now i am currently storing 5000 records in hashmap.I need to know the Maximum capacity.
Thank you,
With Regards,
Prem
Hi,
I have used HashMap in my program.I need to know the capacity of the HashMap.
Now i am currently storing 5000 records in hashmap.I need to know the Maximum capacity.
Thank you,
With Regards,
Prem
Your available heap space.
^ like he said.
But remember that the map actually contains references to the key and value objects, not the objects themselves, so even if your key or value objects are enormous, you can still create a hashmap with millions of references to them. In practice you will nromally run out of space for the value objects long before the hashmap size becomes significant.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.