final void pop(Item item) { if (tos <= 0) { throw new Error("Stack is empty"); } if (stack[ --tos] != item) { int i = tos - 1; while ((i >= 0) && (stack[ i] != item)) i--;  throw new StackException("OperandStack[" + tos + "] is not the expected element (found at " + i + ", " + this + ")"); } stack[ tos] = null; }
final void pop() { if (tos <= 0) { throw new Error("Stack is empty"); } tos--; }
    final void pop(Item item) {        if (tos <= 0) { throw new Error("Stack is empty"); }        if (stack[ --tos] != item) {            int i = tos - 1;            while ((i >= 0) && (stack[ i] != item))                i--;            throw new StackException("OperandStack[" + tos                    + "] is not the expected element (found at " + i + ", "                    + this + ")");        }        stack[ tos] = null;    }