Is the any other way to remove contents of a stack without using the following loop or is there any other way to remove stack contents?
Here is the loop
Here is the loop
Code:
Stack s = new Stack();
.
.
.
.
.
while (s.empty == false){
s.pop();
}
Comment