1.

What is the output of this program?
import java.util.*;
public class hashtable_Example
{
public static void main(String args[])
{
Hashtable object = new Hashtable();
object.put("P", new Integer(12));
object.put("Q", new Integer(21));
object.put("R", new Integer(18));
System.out.print(object.toString());
}
}

A. {R=18, Q=21}
B. {Q=21, P=12}
C. {R=18, P=12}
D. {R=18, Q=21, P=12}
E. {P=12, R=18}
Answer» E. {P=12, R=18}


Discussion

No Comment Found

Related MCQs