I feel the problem is because you are reading the array while operating on the array,list.subList is to read the view, but at the same time you are using removeAll to delete the data