thanassis.com
home
blog
Online Games
Sudoku
Ivory Tower
Web Hangman
Software
Java
Object Oriented
Mobiles / J2ME
Research
C.S. Resources
Galleries
Greece
Music
Photography
Art
Personal
About me
Useful Links
Contact
Site
Downloads
My other sites
Thanassis.gr
Djangopedia
Kilogames
Xoocle
TrainJava
GameAnatomy
Latest News
Stack, example
Stack stack = new Stack();
Object ob1 = new Object();
Object ob2 = new Object();
stack.push(ob1);
stack.push(ob2);
Object top = stack.peek(); // top is equal to ob2
Object tmp = stack.pop(); // tmp is also equal to ob2
Object tmp = stack.pop(); // tmp is now equal to ob1
if (stack.emtpy())
System.out.println("Stack is empty");
Previous slide
Next slide
Back to first slide
View graphic version
Web
this site
Thanassis Blog News
In the News
Deep impact smashes comet
3 Florida shark attacks in a week
Mad Cow
summit in Scotland
Search the Archives