Example Code[]
public void addAtEnd(String s) { if (top == null) { top = new Node (s, null); return; } Node temp = top; while (temp.getNext() != null) { temp = temp.getNext(); }
External links[]
Wikipedia article on linked list.
public void addAtEnd(String s) { if (top == null) { top = new Node (s, null); return; } Node temp = top; while (temp.getNext() != null) { temp = temp.getNext(); }
Wikipedia article on linked list.