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.
IllegalStateException - if the next method has not yet been called, or the remove method has already been called after the last call to the next method
* element0
* element1
* element2
* element3
-->
* element0
* element1
* element2
* element3
--> * element0
* element1
* element2
* element3
Iterator<Integer> iterator = list.iterator();
while (iterator.hasNext()) {
iterator.next();
iterator.remove();
}
Es wird ein Integer zurück gegeben. Aber mit dem musst du ja nichts machen. Wichtig ist, dass der Iterator dann auf dieses Element verweist und du dieses dann löschen kannst.Dann geht es nicht mehr, weil next() wird ein Integer zurückgeben.