Answer to Question #268010 in Java | JSP | JSF for Candy

Question #268010

Consider the following program written in Java and answer the 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("B");

8. obj.add("C");

9. obj.add("C");

10. obj.add("D");

11. obj.remove(2);

12. System.out.println(obj.get(1));

13. }

14. }

What would be the output of the statement when the program is executed? 


1
Expert's answer
2021-11-19T15:33:48-0500

The output of the statement when the program is executed


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS