试题详情
单项选择题 11. class Animal { public String noise() { return “peep”; } }  12. class Dog extends Animal {  13. public String noise() { return “bark”; }  14. }  15. class Cat extends Animal {  16. public String noise() { return “meow”; }  17. }  .....  30. Animal animal = new Dog();  31. Cat cat = (Cat)animal;  32. System.out.printIn(cat.noise());  What is the result?() 

A、 peep

B、 bark

C、 meow

D、 Compilation fails.

E、 An exception is thrown at runtime.

  • E
  • 关注下方微信公众号,在线模考后查看

热门试题