Latest News

 










Example With No Dynamic Execution

Previous slide Next slide Back to first slide View graphic version


Example With No Dynamic Execution


 
My other sites

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