free the space after remove from hashmap

S

Shikha

Hello,
I wish to remove a key value pair from hashmap. if i use remove() it
removes the key-value but still keeps the space and assigns a null
there. i want it to free that space. is there a method to do this ?
shikha
 
B

Bart Cremers

Shikha schreef:
Hello,
I wish to remove a key value pair from hashmap. if i use remove() it
removes the key-value but still keeps the space and assigns a null
there. i want it to free that space. is there a method to do this ?
shikha

I'm not sure what the problem is. If I use remove() on a hashmap it
removes the key and the value and I can not see any 'null' values in
the map.

Could you provide a code example and some more pointers to where you
can see the 'null' value?

Bart
 
S

Shikha

hey i got the problem. i was iterating through the hashmap in an
incorrect way....
sorry to bother.

thanks
shikha
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top