for (Map.Entry<K, V> entry : myMap.entrySet()) { System.out.println("Key: " + entry.getKey() + ". Value: " + entry.getValue()); }