Answers for "iterating over a java map"

3

java foreach map

map.forEach((k, v) -> System.out.printf( " %s : %d \n" , k,v) );
Posted by: Guest on March-16-2020
1

foreach map java

Map<String, String> map = ...
for (Map.Entry<String, String> entry : map.entrySet()) {
    System.out.println(entry.getKey() + "/" + entry.getValue());
}
Posted by: Guest on June-01-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language