I have a stack A and I want to create a stack B that is identical to stack A. I don\'t want stack B to simply be a pointer to A -- I actually want to create a new stack B th
Stack extends Vector, so you can just new up a new Stack and use .addAll(...) to copy the items:
Stack
Vector
.addAll(...)
Stack newStack = new Stack(); newStack.addAll(oldStack);