Created
July 29, 2008 21:53
-
-
Save avdi/3184 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class Scratch { | |
public static void main(String[] args) { | |
HashMap<String, Integer> stuff = new HashMap<String, Integer>() {{ | |
put("A", 1); | |
put("B", 2); | |
put("C", 3); | |
}}; | |
for(String key : stuff.keySet()) { | |
System.out.println(key + ": " + stuff.get(key)); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment