#How does the loop know where the next node is, if the current iteration sets pointers to null
12 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @woven yoke! Please use
/closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
please ping me when answering, thank you
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
It grabs a reference to the next element before setting the one in the node to null
is that something while loops (or loops in general) do under the hood?
or did i blindly look past anything that does it?
Node<T> next = trav.next
The first step in the loop is to grab the reference in to the next variable
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.