Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Java
  4. iterators

iterators

Scheduled Pinned Locked Moved Java
help
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    prithaa
    wrote on last edited by
    #1

    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

    J B 2 Replies Last reply
    0
    • P prithaa

      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

      J Offline
      J Offline
      jschell
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • P prithaa

        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

        B Offline
        B Offline
        BobJanova
        wrote on last edited by
        #3

        If you are passing it to a method, that method might well do something with it which will move the cursor.

        P 1 Reply Last reply
        0
        • B BobJanova

          If you are passing it to a method, that method might well do something with it which will move the cursor.

          P Offline
          P Offline
          prithaa
          wrote on last edited by
          #4

          thank you for your valuable insight

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups