I see nowhere in your original code in which you define the first node pointing to itself. See post #3
Type: Posts; User: copeg
I see nowhere in your original code in which you define the first node pointing to itself. See post #3
Step through your code and write out on paper what is happening. On first insert you create a node:
Node {next = null}
When you loop through upon second insertion, you end up setting current to...