Assuming K is your key type and V is your value type:
for (Map.Entry<K,V> entry : map.entrySet()) {
K key = entry.getKey();
V value = entry.getValue();
// do stuff
}
Assuming K is your key type and V is your value type:
for (Map.Entry<K,V> entry : map.entrySet()) {
K key = entry.getKey();
V value = entry.getValue();
// do stuff
}