Thanks Ulf, Amit, Nicola && Minakshi for the explanation. I see where it went wrong!
1. In my mind i imagined a picture of a
- ArrayList as being literally an ARRAY of elements, things, stuff
-> [array_name||element1][[element2][....][[elementN]
- Iterator as being the "pointer" to an element of that same ARRAY
-> [array_name||element1][[element2][....][[elementN]
Iterator................^
Thanks to your explanation I now understand that:
- An Iterator - only should be created, getted AFTER a Collection-type, List,Set, has been filled with [elements].
- An Iterator - 'works the same as an "ArrayIndex pointer from C", walking from the Head to the Tail of the array.
Thanks everyone !
p.s
This "mind-mixup" comes from also having knowledge in other languages like Pascal, C, C++.
That is what makes me stumble most of the times... old thought and design patterns :-)
Time for a Brain.flush() operation on old language skills before adding more Java to it