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("I", new Integer(25));
    object.put("L", new Integer(60));
    object.put("U", new Integer(20));
    object.clear();
    System.out.print(object.size());
    }
    }
    1. 4
    2. 3
    3. 2
    4. 1
Correct Option: E

0



Your comments will be displayed only after manual approval.