Work with LinkedHashMap in Java

Map<Integer, String> dic = new LinkedHashMap<Integer, String>() {{
        put(3, "three");
        put(1, "one");
        put(2, "two");
}};

String str = "";
for (Entry<Integer, String> entry : dic.entrySet()) {
    str += (str == "" ? "{" : ", ") +
        String.format("%d=%s"entry.getKey(), entry.getValue());
    }
    str += "}";
//str is "{3=three, 1=one, 2=two}" 
//the order in which the entries were put into the map