how to turn stack in to an array? : <p>I am working on a stack, where i have to create it from scratch without using JAVA collections. I have coded the push, pop, peek and all other required methods. What I am confused about is the method of converting this stack to an array, with the top of the stack being element 0, how can this be done without using the toArray() method?</p>
