4 min read
This guide covers static and dynamic types of objects, focusing on how they are determined during object creation. It then explains method calling and polymorphism, illustrating how static and dynamic types influence which method is executed. The guide uses code examples to demonstrate the interaction between static/dynamic types and static/non-static methods.
Give us your feedback and let us know how we can improve
Question 1 of 5
Given the declaration Animal cat = new Cat();
, which type is the static type of the cat
object? 🤔
Cat
Object
Animal
None of the above