213k views
4 votes
What is the potential problem with the java.util.Stack implementation?

User Splatch
by
8.9k points

1 Answer

3 votes

Step-by-step explanation:

The potential problem with java.util.Stack is that it is an extension of the Vector class And hence there are a lot of operation in java.util.Stack that does not follow the rule of the basic assumption of the stack.

for Ex:- You can keep track of the element's position in stack using the index.

So this the potential problem with the java.util.Stack.

User Kaydeen
by
7.1k points