Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

循环删除元素的时候foreach #49

Open
JasonLinkinBright opened this issue Jul 28, 2021 · 0 comments
Open

循环删除元素的时候foreach #49

JasonLinkinBright opened this issue Jul 28, 2021 · 0 comments

Comments

@JasonLinkinBright
Copy link

使用foreach可能会造成concurrentmodifiedexception(删除第二个元素后会发生)。
可以使用迭代器来删除。
项目全局搜下 foreach 的使用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant