Wie kann man eine Variable um genauer zu sein eine List von 2 Threads zugänglich machen ohne eine ConcurrentModificationException zu bekommen?
Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
syncronized (list) {
}
Es wird dennoch emfohlen, dort ebenfalls die "synchronizedList" zu benutzen:madmaurice hat gesagt.:hat geklappt. auch ohne synchronizedList :>Code:syncronized (list) {}
Marco13 hat gesagt.:Wenn man den Fleiß aufbringen will, kann man stattdessen auch überall(!!!) wo man was mit der list macht, einen dicken synchronized-block drumpappen - aber schön ist das nicht....