The following method is intended to remove all values from the ArrayList a that have the same value as val; however, this method does not work correctly.public void removeValue(ArrayList a, int val) {int i;for (i = 0; i < a.size(); i++) {if (a.get(i) == val) {a.remove(i);}}}If the a contains 2 3 4 3 3 4 4 5 4 3 2 1 and val is equal to 4, then a should contain 2 3 3 3 5 3 2 1 after removeValue is invoked. What does a actually contain after removeValue is invoked? (2 points)1) 2 3 3 4 4 5 4 3 2 12) 2 3 3 3 4 5 3 2 13) 2 4 3 4 5 4 2 14) 2 3 3 3 5 3 2 15) 2 4 3 4 4 5 3 2 1