Adds the item to this stack. @param item the item to add
(Item item)
| 89 | * @param item the item to add |
| 90 | */ |
| 91 | public void push(Item item) { |
| 92 | Node<Item> oldfirst = first; |
| 93 | first = new Node<Item>(); |
| 94 | first.item = item; |
| 95 | first.next = oldfirst; |
| 96 | n++; |
| 97 | } |
| 98 | |
| 99 | /** |
| 100 | * Removes and returns the item most recently added to this stack. |
no outgoing calls
no test coverage detected