push method

void push(
  1. T item
)

Adding element from stack

Implementation

void push(T item) {
    if (_count == _stack.length) throw StackOverflowError();
    _stack[_count] = item;
    _count++;
  }