I use the list iterator of Java, and I don\'t understand how does the previous method work. I get the next element of the Linked list \"B\" and then I try to get the previous el
From JavaDocs:
Returns the previous element in the list and moves the cursor position backwards. This method may be called repeatedly to iterate through the list backwards, or intermixed with calls to next to go back and forth. (Note that alternating calls to next and previous will return the same element repeatedly.)
Important part here is: (Note that alternating calls to next and previous will return the same element repeatedly.)