how to iiterate through hash map using keys
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   srinivas_reddy
Posted On:   Friday, March 3, 2006 07:36 PM

I want to iterate through the hash map using the key. can any one give me an idea of how to do that...

Re: how to iiterate through hash map using keys

Posted By:   Anonymous  
Posted On:   Thursday, March 23, 2006 02:06 PM

Iterator iterator = map.entrySet().iterator();
Map.Entry entry = null;
entry = ( Map.Entry ) loanIterator.next();

it gives better performance than keyset.iterator();

because your objects are alreasdy mapped together.. So no need to check hash table.

Re: how to iiterate through hash map using keys

Posted By:   WarnerJan_Veldhuis  
Posted On:   Sunday, March 5, 2006 04:33 PM

myHashMap.keySet.iterator()
About | Sitemap | Contact