1.

What is the output of this program?
import java.util.*;
public class Output
{
public static void main(String args[])
{
ArrayList object = new ArrayList();
object.add("Y");
object.add("O");
object.add("U");
object.ensureCapacity(3);
object.trimToSize();
System.out.println(object.size());
}
}

A. 0
B. 1
C. 2
D. 3
E. None of these
Answer» E. None of these


Discussion

No Comment Found

Related MCQs