print a value from a map in java code example
Example 1: print map java
map.forEach((key, value) -> System.out.println(key + ":" + value));
Example 2: print elements in map java
// Java 8 - Collection.iterator() + Iterator.forEachRemaining()
map.keySet().iterator()
.forEachRemaining(System.out::println);