多态性
Human human =null;
American american=new American();
Chinese chinese=new Chinese();
human =american;
human.eat();
human=chinese;
human.eat();
同样的human.eat();
执行的代码段分别是American和Chinese类中的方法
这就是面向对象的多态性
动态绑定
如果发生了casting,那么引用方法就是优先选择实际类型方法,没有再去转换类型(隐式转换);如果发生了继承,那么从当前类向父类开始寻找,一直找到为止。