Map<String, String> map = new HashMap<>();
map.put("1", "a");
map.put("2", "b");
map.put("3", "c");
map.put("4", "d");
for(Map.Entry<String,String> mapEntry : map.entrySet()){
System.out.println(mapEntry.getKey() + "---" + mapEntry.getValue());
}