java sout map code example Example: print map java map.forEach((key, value) -> System.out.println(key + ":" + value));