pop All
Pops the n topmost elements in this Stack, where n is specified by the parameter. The topmost element in the stack gets the list's head i.e. index 0
.
Return
The popped elements in a List, with the last popped element at the highest index.
Parameters
num To Pop
Specifies how many elements to pop.
Throws
If numToPop is negative or greater than the Stack's size.