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