Skip to content

Instantly share code, notes, and snippets.

@landon9720
Created May 10, 2012 18:15
Show Gist options
  • Save landon9720/2654845 to your computer and use it in GitHub Desktop.
Save landon9720/2654845 to your computer and use it in GitHub Desktop.
anonymous class constructor
Map<String, String> map = new HashMap<String, String() {{
add("foo", "bar");
add("name", "landon");
}};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment