Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

map interation in java

Map map = new HashMap();
Iterator entries = map.entrySet().iterator();
while (entries.hasNext()) {
    Map.Entry entry = (Map.Entry) entries.next();
    Integer key = (Integer)entry.getKey();
    Integer value = (Integer)entry.getValue();
    System.out.println("Key = " + key + ", Value = " + value);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #map #interation #java
ADD COMMENT
Topic
Name
4+4 =