()
| 50 | } |
| 51 | |
| 52 | public int pop() { |
| 53 | if(isEmpty()){ |
| 54 | throw new EmptyStackException(); |
| 55 | } |
| 56 | Node node = top; |
| 57 | top = top.getNextNode(); |
| 58 | length--; |
| 59 | return node.getData(); |
| 60 | } |
| 61 | |
| 62 | public int peek(){ |
| 63 | if(isEmpty()){ |
nothing calls this directly
no test coverage detected