Home » JAVA Programming » Collections » Question
  1. What is the output of this program?
    import java.util.*;
    public class hashtable
    {
    public static void main(String args[])
    {
    Hashtable object = new Hashtable();
    object.put("D", new Integer(30));
    object.put("E", new Integer(70));
    object.put("F", new Integer(60));
    object.remove(new String("E"));
    System.out.print(object);
    }
    }
    1. {F=60, D=30, E=70}
    2. {D=30, E=70}
    3. {F=60, D=30}
    4. {D=30, E=70, F=60}
    5. None of these
Correct Option: C

{F=60, D=30}



Your comments will be displayed only after manual approval.