How would I create a shallow copy of a stack? The interface method which I must implement is:
MyStackInterface<T> copy(); // 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?