hashmap print code example
Example 1: print map java
map.forEach((key, value) -> System.out.println(key + ":" + value));
Example 2: print only values in map
map.forEach((key, value) -> System.out.println(key + " " + value));
map.forEach((key, value) -> System.out.println(key + ":" + value));
map.forEach((key, value) -> System.out.println(key + " " + value));