pop method

T pop()

Removing element from stack throws exception if stack is empty

Implementation

T pop() {
    if (_count == 0) throw Exception("Out of Range");
    print(_count);
    _count--;
    _stack[_count] = null;
    return _stack[_count];
  }