09 cat = (Cat) animal; 10 System.out.println(cat.noise()); 11 } else { 12 System.out.println("animal is not Cat's instance"); 13 } 14 } 15 } 16 class Dog extends Animal { 17 public String noise() { 18 return "Dog"; 19 } 20 } 21 class Cat extends Animal { 22 public String noise() { 23 return "Cat"; 24 } 25 }