copying and comparing stacks
How would I create a shallow copy of a stack? The interface method which I must implement is:
// Returns a shallow copy of this stack
It doesn't make sense to me that I return an interface....
The other method that I must implement is:
boolean equals(MyStackInterface<T> s);
// Returns true if the contents of this Stack are equal to the contents of s
// Does not change the contents of s.
Can anyone help me please?
Re: copying and comparing stacks
Are you looking for
This will return an array of [StackTraceElement]s.