java polimorfismo

Solutions on MaxInterview for java polimorfismo by the best coders in the world

showing results for - "java polimorfismo"
Rafael
26 Jun 2016
1class Animal {
2  public void makeSound() {
3    System.out.println("Grr...");
4  }
5}
6class Cat extends Animal {
7  public void makeSound() {
8    System.out.println("Meow");
9  }
10}
11class Dog extends Animal {
12  public void makeSound() {
13    System.out.println("Woof");
14  }
15}
16
17