Check out example codes for "java remove from arraylist while iterating". It will help you in understanding the concepts better.

Code Example 1

ListIterator<Book> iter = books.listIterator();
while(iter.hasNext()){
    if(iter.next().getIsbn().equals(isbn)){
        iter.remove();
    }
}

Learn ReactJs, React Native from akashmittal.com