(int stackNum)
| 42 | } |
| 43 | |
| 44 | static int peek(int stackNum) { |
| 45 | if (isEmpty(stackNum)) { |
| 46 | throw new EmptyStackException(); |
| 47 | } |
| 48 | return buffer[absTopOfStack(stackNum)]; |
| 49 | } |
| 50 | |
| 51 | static boolean isEmpty(int stackNum) { |
| 52 | return stackPointer[stackNum] == -1; |
no test coverage detected