1: public T pop() 2: { 3: checkInitialization(); 4: if (isEmpty()) 5: throw new EmptyStackException(); 6: else 7: return stack.remove(stack.size() - 1); 8: } // end pop 9: // Version 4.0