Home Help Java S Java Stack
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

Java Stack

Advertisement
The Stack class works on the principle last-in-first-out (LIFO) stack of objects.

Java Stack

     

The Stack class works on the principle last-in-first-out (LIFO) stack of objects. It extends the Vector class of the legacy classes having five operations allowing a vector to be treated as a stack. Methods push() and pop() are used to pick and insert the objects into the stack respectively, while the method peek for the item at the top on the stack to check whether the stack is empty. 

Initially the stack (when it is first created) does not contain any item.

To know more about java stack click on the link:

http:/www.roseindia.net/java/beginners/stack-demo.shtml

Advertisements

Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 17, 2009

Ask Questions?    Discuss: Java Stack  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
DMCA.com