diff --git a/ideone_qNSN1A.java b/ideone_qNSN1A.java new file mode 100644 index 0000000..475017e --- /dev/null +++ b/ideone_qNSN1A.java @@ -0,0 +1,14 @@ +import java.util.*; + class HashMapExample { + public static void main(String args[]) { + // create and populate hash map + HashMap map = new HashMap(); + map.put(101,"Let us C"); + map.put(102, "Operating System"); + map.put(103, "Data Communication and Networking"); + System.out.println("Values before remove: "+ map); + // Remove value for key 102 + map.remove(102); + System.out.println("Values after remove: "+ map); + } +} \ No newline at end of file