Array implementation of Stack using MyArrayList