Map<String, String> forEarch java code example Example: java foreach map map.forEach((k, v) -> System.out.printf( " %s : %d \n" , k,v) );