Q147
What will be the output of the following Java code? import java.util.*; class hashtable public static void main(String args[]) Hashtable obj = new Hashtable(); obj.put("A", new Integer(3)); obj.put("B", new Integer(2)); obj.put("C", new Integer(8)); obj.remove(new String("A")); System.out.print(obj);
A.
{C=8, B=2}
AnswerB.
[C=8, B=2]
C.
{A=3, C=8, B=2}
D.
[A=3, C=8, B=2]
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board