import java.util.Hashtable;Runtime:
public class main {
public static void main(String[] s) {
Hashtable table = new Hashtable();
table.put("key1", "v1");
table.put("key2", "v2");
table.put("key3", "v3");
if(table.containsKey("key2"))
System.out.println("key2 exists in Hashtable");
else
System.out.println(table.containsKey("key2 does not exist in Hashtable");
}
}
key2 exists in Hashtable
Please disable your ad blocker and refresh the window to use this website.