In this second problem, you will complete the push()
method. This method adds an element to the top of the stack stored in the instance...
X1367: ArrayStack - push
In this second problem, you will complete the
push()
method. This method adds an element to the
top of the stack stored in the instance variable (stack
)
you created in the previous problem.
Worthy of note, a stack is a LIFO - last in, first out
structure. You always add at one end of the linear
structure and remove from the same end.
You might want to look at the documentation for
ArrayList
to refresh your memory of how to use that class.
Your Answer:
Feedback
Your feedback will appear here when you check your answer.