ADT stack lets you peek at its top entry without removing it. For some applications of stacks, youalso need to peek at the entry beneath the top entry without removing it. We will call such an operationpeekNxt.If the stack has more than one entry, peekNxt returns the second entry from the top without altering the stack. If the stack has fewer than two entries, peekNxt throws an exception. Write a linkedimplementation of a stack class call LinkedStack.java that includes a method peekNxt.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here