Test it Now
Output:dog is eating...
In the above example object type cannot be determined by the compiler, because the instance of Dog is also an instance of Animal.So compiler doesn't know its type, only its base type.




Hot Tutorials

Contact US

Email:jjw.quan@gmail.com

Dynamic Binding
10/30