Consider the following code segment, applied to list, an ArrayList of Integer values.
int len = list.size();
for (int i = 0; i < len; i++)
{
list.add(i + 1, new Integer(i));
Object x = list.set(i, new Integer(i + 2));
}
If list is initially 6 1 8, what will it be following execution of the code segment?
(A) 2 3 4 2 1 8
(B) 2 3 4 6 2 2 0 1 8
(C) 2 3 4 0 1 2
(D) 2 3 4 6 1 8
(E) 2 3 3 2