Explanation:
The advantages of java.util.Stack are as following:-
- java.util.Stack is an implementation of the vector class hence it can keep track of position of elements in the stack hence it is not required to store an additional pointer for each node.
- In the implementation it allocates space only that much is needed.
These are the two advantages of java.util.Stack.