What does this loop do....please explain..!!!
for (String key : output.keySet())
{
       // some code
}

output is an object of hashmap<string, string> and i want to iterate through the hashmap for all values. i find an example on the internet that write such for loop...but when i try to execute this ...eclipse does not allow mw to do so..please tell me an efficient way or explain this loop..so that i ca iterate through the map.

pseudo of my function is somewhat like this

public void fuction (String key)
{
     Set<String> keys = output.keySet();
     
    // now i have to iterate through the keySet and match 'key' with the keys from keySet 
}
What does this loop do....please explain..!!!
===

for (String key : output.keySet())
{
       // some code
}

output is an object of hashmap<string, string> and i want to iterate through the hashmap for all values. i find an example on the internet that write such for loop...but when i try to execute this ...eclipse does not allow mw to do so..please tell me an efficient way or explain this loop..so that i ca iterate through the map.

pseudo of my function is somewhat like this

public void fuction (String key)
{
     Set<String> keys = output.keySet();
     
    // now i have to iterate through the keySet and match 'key' with the keys from keySet 
}