try this
list.removeAll(Arrays.asList(2));
it will remove all elements with value = 2
you can also use this
list.remove(Integer.valueOf(2));
but it will remove only first occurence of 2
list.remove(2)
does not work because it matches List.remove(int i)
which removes element with the specified index