What will be the output of the following Java program? [code] import java.util.*; class Output { public static void

What will be the output of the following Java program?
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());
        }
    }
A. 0
B. 1
C. 2
D. Any Garbage Value
 

Tìm kiếm

Back
Top