Introduction to OOP Chapter 11: Static and Dynamic Behavior: next previous audio real text

Static Class and Dynamic Class

In a statically typed language we say the class of the declaration is the static class for the variable, while the class of the value it currently holds is the dynamic class.

Most statically typed OO languages constrain the dynamic class to be a child class of the static class.

var
	pet : Mammal;
	fido : Dog
begin
	pet := fido; // static class is Mammal, dynamic class is Dog
end;
Intro OOP, Chapter 11, Slide 06