Limited access

Upgrade to access all content for this subject

Consider the following code.

ArrayList list = new ArrayList();
list.add(7);
list.add(5);
list.add(1);
list.add(3);
list.add(1);
list.remove(new Integer(1));
System.out.print(list);

What is printed as a result of executing the code?

A

[7, 5, 1, 3, 1]

B

[7, 5, 3]

C

[7, 1, 3, 1]

D

[7, 5, 3, 1]

E

[ ]

Select an assignment template