39. ArrayStack - the push Operation //----------------------------------------------------------------- // Adds the specified element to the top of the stack, expanding // the capacity of the stack array if necessary. //----------------------------------------------------------------- public void push (T element) { if (size() == stack.length) expandCapacity(); stack[top] = element; top++; }