I have the following code which works fine.
Hashtable hash = new Hashtable(10,10);
int i= 1;
hash.put(i, "StringV");
System.out.println(hash.get(i));
I read somewhere that Hashable takes objects as key and primitive types are not allowed as keys. I tried int as key and it worked. Can anyone tell me about this.