Created
January 6, 2019 17:59
-
-
Save MadinaB/b8b62d6b86a216bf5c6d0162c0c6c5a9 to your computer and use it in GitHub Desktop.
ConcurrentModificationException
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class MyClass { | |
public static void main(String args[]) { | |
LinkedList<Integer> list = new LinkedList<>(); | |
list.addFirst(1); | |
Iterator key = list.listIterator(0); | |
list.add(1); | |
System.out.println(key.next()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment