0
Can anyone explain the concurrent modification exception in java with example?
2 Antworten
+ 6
When one thread iterate the collection and other thread try to modify that collection then this exception comes.
Check here with example:
https://www.journaldev.com/378/java-util-concurrentmodificationexception
+ 5
🅰🅹 - ɪ'ᴍ ᴄʀɪᴍɪɴᴀʟʟʏ ɢᴏᴏᴅ!
It's not just with multi-threads. This can occur on the same thread when attempting to add or remove an item in a list while iterating through the list.