как это работает for(Map.Entry<String, String> x : map.entrySet()) System.out.println(x.getKey() + " - " + x.getValue());