Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to iterate hashmap in java

for (Map.Entry<String, String> entry : yourHashMap.entrySet()) {
	System.out.println(entry.getKey() + " = " + entry.getValue());
}

map.forEach((k, v) -> {
    System.out.format("key: %s, value: %d%n", k, v);
});
 
PREVIOUS NEXT
Tagged: #iterate #hashmap #java
ADD COMMENT
Topic
Name
8+2 =