import java.util.Hashtable;
import java.util.Iterator;
public class HashTableDemo {
public static void main(String[] args) {
//creating hashTable
Hashtable<Integer, String> ht = new Hashtable<>();
//Adding element to our HashTable
ht.put(1, "Vidya");
ht.put(2, "Sambhavna");
ht.put(3, "Tina");
ht.put(4, "Gravit");
ht.put(5, "Anmol");
Iterator<Integer> itr = ht.keySet().iterator();
//cant perform any manupulation after taking iterator out
// ht.put(6, "Kiran");
while (itr.hasNext()) {
Integer key = itr.next();
String value = ht.get(key);
System.out.println("key = " + key + " " + "Value = " + value);
}
}
}