Why do I get different results when I run equivalent code for hashtable and hashmaps?
Iterator<Integer> it = ht.keySet().iterator();
while(it.hasNext()) {
    i = it.next();
    System.out.println(i + " : " + ht.get(i));
}
ht is a hashtable object. If i replace with hm, a hashmap object, it doesn't print the values from get() method instead prints null. Why is that?
ht.toString()for comparison.