Consider the following program written in Java to answer this
Question:
1. import java.util.*;
2. class Arraylist
3. {
4. public static void main(String args[])
5. {
6. ArrayList obj = new ArrayList();
7. obj.add("A");
8. obj.add("B");
9. obj.add("C");
10. obj.add("D");
11. System.out.println(obj);
12. }
13. } What would be the output of the statement when the program is executed?
The answer to your question is provided in the image:
Comments
Leave a comment