Answers for "how to loop a map"

5

java for map

Map<String, String> map = new HashMap<>();

for(Entry<String, String> entry:map.entrySet()) {
  System.out.println("key: "+entry.getKey()+" value: "+entry.getValue());
}
Posted by: Guest on July-07-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language