iterators
-
Hello when I pass iterator as a parameter why is it that the cursor position changes without me giving any instructions about iterator.next() or iterator.previous() any good article regarding iterators I need to read will be of great help especially passing as parameters PRitha
-
Hello when I pass iterator as a parameter why is it that the cursor position changes without me giving any instructions about iterator.next() or iterator.previous() any good article regarding iterators I need to read will be of great help especially passing as parameters PRitha
prithaa wrote:
when I pass iterator as a parameter why is it that the cursor position changes
It doesn't. Something else is going on. Some possibilities. 1. You are in fact moving it somewhere. 2. You expect that item A should be first, thus when it doesn't show up first you think the iterator changed while in fact A was never first.
-
Hello when I pass iterator as a parameter why is it that the cursor position changes without me giving any instructions about iterator.next() or iterator.previous() any good article regarding iterators I need to read will be of great help especially passing as parameters PRitha
-
If you are passing it to a method, that method might well do something with it which will move the cursor.