Because a Stack can contain any kind of Objects, of unlimited complexity, there's no sensible way to provide a generic "print" method that would work usefully for everything that could be in the stack. Hence all the previous advice saying that you have to loop thru all the elements in the Stack printing each element in some way that makes sense for the type of each element.
Reputation Points: 1907
Solved Threads: 950
Posting Expert
Offline 5,768 posts
since Apr 2008