View Problem

Define an initial map

Define the map {circle:1, triangle:3, square:4}
ExpandDiskEdit
java
Map shapes = new HashMap();
shapes.put("circle", 1);
shapes.put("triangle", 3);
shapes.put("square", 4);
ExpandDiskEdit
java
Map shapes = new HashMap() {{ put("circle",1); put("triangle",3); put("square",4); }}

Submit a new solution for java
There are 31 other solutions in additional languages (clojure, cpp, erlang, fantom ...)