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
Persona
l
About me
Useful Links
Contact
Site
Download
Latest News
Example With No Dynamic Execution
public class Cat {
public static void main(String[] argv) {
Animal myToy = new Mouse();
myToy.play();
}
}
public class Animal {
public void play() {
System.out.println(“Playing with animal”);
}
}
public class Mouse extends Animal {
public void play() {
System.out.println(“Playing with mouse”);
}
}
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