All Questions
Tagged with fail-fast collections
6 questions
-3
votes
1
answer
275
views
How can we handle the Java ConcurrentModificationException using try-catch?
I am trying to handle the java ConcurrentModificationException exception using try-catch block but still I am getting the same error when compiling the code.
import java.util.*;
public class failFast{
...
1
vote
2
answers
699
views
How Fail-fast Iterator works internally? [duplicate]
I know what is a fail-fast and fail-safe iterator.
Fail-Fast iterators immediately throw ConcurrentModificationException if there is a structural modification of the collection.
Fail-Safe doesn't ...
1
vote
3
answers
453
views
Java - Will concurrent modification exception occur while using classic for loop?
Is there is a chance for getting concurrent modification exception occur while using classic for loop?
import java.util.*;
class IterTest{
public static void main(String[] args){
List<...
-1
votes
1
answer
2k
views
Why we need fail fast and fail safe software design? [closed]
We know Java has fail-fast and fail-safe iteration design.
I want to know , why we need these basically. Is there any fundamental reason for this separation? . What is the benefit of this design?.
...
5
votes
5
answers
4k
views
fail-fast iterator
I get this definition : As name suggest fail-fast Iterators fail as soon as they realized that structure of Collection has been changed since iteration has begun.
what it mean by since iteration has ...
-1
votes
4
answers
1k
views
Why is there no error when using iterator.remove?
If I use Iterator.remove(), everything is fine. If I use ArryaList.remove(), I always receive the error java.util.ConcurrentModificationException.
Can anyone point out the reason?