summaryrefslogtreecommitdiff
path: root/java/10-collections/Test6Map.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/10-collections/Test6Map.java')
-rw-r--r--java/10-collections/Test6Map.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/java/10-collections/Test6Map.java b/java/10-collections/Test6Map.java
new file mode 100644
index 0000000..77ce613
--- /dev/null
+++ b/java/10-collections/Test6Map.java
@@ -0,0 +1,19 @@
+import java.util.HashMap;
+import java.util.Map;
+
+public class Test6Map {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+
+ Map<String, Customer> customers = new HashMap<String, Customer>();
+// Map<Integer, Account> accounts = ...
+
+ customers.put("nugegoda", new Customer("Kamal"));
+ customers.put("kalubowila", new Customer("Praveen"));
+
+ System.out.println(customers.get("kalubowila"));
+ }
+}