Q. What will be the output of the following code –
Code:
import java. util.Hashtable;
import java. util.Map;
public class hashTableBlog {
public static void main (String args[])
{
Map<Integer,String> hashtable = new Hashtable<Integer,String>();
hashtable.put(11,”a”);
hashtable.put(null,”c”);
hashtable.put(null,null);
System.out.println(hashtable.size());
System.out.println(hashtable);
}
}
β
Correct Answer: (A)
Runtime Exception