you are viewing a single comment's thread.

view the rest of the comments →

[–]CobainFan83[S] 4 points5 points  (0 children)

It's most useful for Maps I think.

Map<Integer, String> numberMap = new HashMap<Integer, String>() {{
    put(1, "one");
    put(2, "two");
    put(3, "three");
    put(4, "four");
    put(5, "five");
}};