I have a Map<String,String> with large number of key values pairs. Now I want to remove selected keys from that Map. Following code shows what I did to achieve that.
Set keySet = new HashSet(); //I added keys to keySet which I want to remove. 
Then :
Iterator entriesIterator = keySet.iterator();
while (entriesIterator.hasNext()) {
   map.remove( entriesIterator.next().toString());
} 
This is working fine. What would be the better approach?
 
     
     
     
    