0
How does next() method in iterator class differ in output in arraylist collection class and linkedlist collection class?????????
Why does the next() method(iterator) in linkedlist collection class bring the very first element and in arraylist collection class the next() method brings(outputs) the second element on the list
1 ответ
+ 3
In both ArrayList and LinkedList next() method[Iterator] class bring first element.
https://code.sololearn.com/cYnB0ZE3dqUU/?ref=app
https://code.sololearn.com/cYJ8C79jgepi/?ref=app