java remove from arraylist while iterating

92

java remove from arraylist while iterating -

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

Comments

Submit
0 Comments