File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stack clearing problem.

 
Adam Ellsworth
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm writing a simple palindrome problem but its giving me a hard time. I'm using stack.empty(); to empty the stack but it is only removing the top element of the stack. Anyone know why it would do this?

P.S. My queue.clear(); works fine.

Thanks in advance.
 
Adam Ellsworth
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nevermind, just tried stack.clear(); and that worked, ugh, lol.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic