From 530141c542ab3b44991f05016e66db651795e9c9 Mon Sep 17 00:00:00 2001 From: Kamal Wickramanayake Date: Sat, 21 Feb 2026 20:33:23 +0530 Subject: Added java/collections and java/error handling sample code --- java/10-collections/Test6Map.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 java/10-collections/Test6Map.java (limited to 'java/10-collections/Test6Map.java') 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 customers = new HashMap(); +// Map accounts = ... + + customers.put("nugegoda", new Customer("Kamal")); + customers.put("kalubowila", new Customer("Praveen")); + + System.out.println(customers.get("kalubowila")); + } +} -- cgit v1.2.3