• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Use of a Stack class in real world

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,


As everybody knows that a Stack which is used for LIFO mechanism .



But how does this will be useful in a real world programming ??

Because as far as i know for List implemenatation classes ArrayList or a LinkedList would be sufficient depending upon the purpose .

please advise even my question is a dump one .
 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi Kiran V wrote:... Because as far as i know for List implemenatation classes ArrayList or a LinkedList would be sufficient depending upon the purpose..

Not sure what you meant by this. But there are so many uses of Stack in the computing world. Few of them here
 
Wouter Oet
Saloon Keeper
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.util.Stack implements the List interface. It adds some methods to view and remove the last element.
A real world example is a stack-based parser.
 
eric totte
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A good introduction to the use of a Stack would be to evaluate arithmetic operations, an example is shown here
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks totte , william.
 
Rob Spoor
Sheriff
Pie
Posts: 20514
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William? Do you mean Wouter instead?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure, John.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Wouter Oet .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic