Hi Guys, Kind of hit a wall with this one...
I understand the concept of why I'm getting the concurrent error with an Arraylist, however it doesn't always seem to throw the error.
Of the 2 code snippets below, only the second one throws the error. The 1st one compiles and run without any issue.
From everything I've been reading it should not allow for the removal of an item from an Arraylist inside a for each loop???
As mentioned in the JavaDoc, the fail-fast mechanism is best effort. This means that you can't depend on it to fail correctly... and of course, you can't depend on it to work correctly (or consistently) with all versions of the JVM, when used incorrectly, either.