above is a linked list with nodes that contain 2 fields - an integer value and a link to next to the next node; last node linked to terminator symbol to signify end of list/null link
public Int_Node (int initialData, Int_node
initialLink) {\
data = initialData; //integer value\
link = initialLink; //reference to next node in list\
}\
Diagram showing how a node is inserted after an existing nodeInserting node before existing node cannot be done directly - instead you have to keep track of the previous node and insert a node after that
previous.link);
while (prev.link != null) {\
prev = head;\
prev = prev.link;\
}\
Removing node after given node - to find and remove a particular node, you still have to keep track of the previous element
while (pointer != null) {\
pointer = pointer.link;\
}\
while (pointer != null) {\
System.out.print(pointer.data + " ");\
pointer = pointer.link;\
}\