Map<String,Integer> map = new HashMap<>(); map.put("one",1); map.put("two",1); map.put("three",1); map.put("four",1); map.put("five",1); for(Map.Entry<String,Integer> me:map.entrySet()){ System.out.println(me.getKey() + " --> " + me.getValue()) ; }
Map<String,Integer> map = new HashMap<>(); map.put("one",1); map.put("two",1); map.put("three",1); map.put("four",1); map.put("five",1); for(Map.Entry<String,Integer> me:map.entrySet()){ System.out.println(me.getKey() + " --> " + me.getValue()) ; }