Trịnh Thị Hòa
New member
What will be the output of the following Java program?
A. 0
B. 1
C. 2
D. Any Garbage Value
Code:
import java.util.*;
class Output
{
public static void main(String args[])
{
ArrayList obj = new ArrayList();
obj.add("A");
obj.add(0, "B");
System.out.println(obj.size());
}
}
B. 1
C. 2
D. Any Garbage Value