What's wrong with using the Stack class?
Java API: Stack (Java 2 Platform SE v1.4.2)
That aside, if you want a peek method, simply return the item at the top of stack without removing it.
...
Type: Posts; User: helloworld922
What's wrong with using the Stack class?
Java API: Stack (Java 2 Platform SE v1.4.2)
That aside, if you want a peek method, simply return the item at the top of stack without removing it.
...