展开全部
都是从collection里面删除,参数不一样,具体操作也不一样
list的api
Object remove(int index)
Removes the element at the specified position in this list (optional operation).
boolean remove(Object o)
Removes the first occurrence in this list of the specified element (optional operation).
iterator的
void remove()
Removes from the underlying collection the last element returned by the iterator (optional operation).
处于并发访问的问题最好用iterator
list的api
Object remove(int index)
Removes the element at the specified position in this list (optional operation).
boolean remove(Object o)
Removes the first occurrence in this list of the specified element (optional operation).
iterator的
void remove()
Removes from the underlying collection the last element returned by the iterator (optional operation).
处于并发访问的问题最好用iterator
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询