For the following code (Same as Method dispatch 1), assume that: Classes Person, Animal, Dog, and Cat are all defined. Dog and Cat are subclasses of Animal. Animal, Dog, and Cat all implement a sayHello method Person implements a greet method Look at line 10. The first time through the loop, what class does Java use for a, to choose which sayHello() method to run?简答题

题目图片

登录即可查看完整答案

我们收录了全球超50000道真实原题与详细解析,现在登录,立即获得答案。

类似问题

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!