Figurative Code for Push/Pop
l
s.push(Object x):
s.head = new Cell(x, s.head);
l
l
l
s.pop():
Object top = s.head.value;
s.head = s.head.next;
return top;
s.head
s.head.value
s.head.next
Java notation for the
head value of stack s.