I tried to iterate over hashmap in Java, which should be a fairly easy thing to do. However, the following code gives me some problems:
HashMap hm = new HashMap(
With Java 8:
hm.forEach((k, v) -> { System.out.println("Key = " + k + " - " + v); });