Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java 8 map foreach

public void iterateUsingEntrySet(Map<String, Integer> map) {
    for (Map.Entry<String, Integer> entry : map.entrySet()) {
        System.out.println(entry.getKey() + ":" + entry.getValue());
    }
}
Source by www.baeldung.com #
 
PREVIOUS NEXT
Tagged: #java #map #foreach
ADD COMMENT
Topic
Name
6+3 =