Examveda

What will be the output of the following Java code?
import java.util.*;
class vector 
{
    public static void main(String args[]) 
    {
        Vector obj = new Vector(4,2);
        obj.addElement(new Integer(3));
        obj.addElement(new Integer(2));
        obj.addElement(new Integer(5));
        obj.removeAll(obj);
        System.out.println(obj.isEmpty());
    }
}

A. 0

B. 1

C. true

D. false

Answer: Option C


This Question Belongs to Java Program >> Collections Framework In Java

Join The Discussion

Related Questions on Collections Framework in java