Or so it seems:
Loop(
Fill java linked list with nodes
Make nodes point at stuff, one index per loop incremented
If I print the pointers, one per loop, they are good for full loop
Insert nodes between nodes using add(i, node)
Print pointers one per loop, look good.
Print pointer(index 5):
Starts null, takes desired value, goes back to null after five loops.
)
Why are my pointers turning null?
Is java add() shuffling them instead of being a true linked list?
Thank you.
Loop(
Fill java linked list with nodes
Make nodes point at stuff, one index per loop incremented
If I print the pointers, one per loop, they are good for full loop
Insert nodes between nodes using add(i, node)
Print pointers one per loop, look good.
Print pointer(index 5):
Starts null, takes desired value, goes back to null after five loops.
)
Why are my pointers turning null?
Is java add() shuffling them instead of being a true linked list?
Thank you.
Why is Java LinkedList correpting my nodes?