X355: ArrayBasedStack toArray

Write the ArrayBasedStack member method toArray. The method returns an Object array with a copy of each element in the stack with the top of the stack being the last element. Recall that the ArrayBasedStack has three fields: T[] contents; int numberOfEntries; int capacity;

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.