Remove entries from the list using iterator

前端 未结 4 876
无人及你
无人及你 2020-12-21 09:30

I need to write a simple function that will delete all entries in the List that contains objects of the class Elem. I wrote the function remo

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-21 09:51

    You have to call the iterator's "remove" method: http://www.java-examples.com/remove-element-collection-using-java-iterator-example.

提交回复
热议问题