Whenever you hear the term static in relation to programming languages, it usually means the idea is tied to compile time. Similarly, the term dynamic almost always means run-time. In this chapter, we will see how this static versus dynamic dichotomy is manifest in several different ways in object-oriented programming languages.
The first is static versus dynamic typing. The issue here is when a variable is tied to a type. This can happen either at compile time or at run time.
Related to this, but not identical, is the issue of static versus dynamic class types. The issue here is whether a variable declared with a static type can nevertheless still be assigned values from a different class at run time.
Static versus dynamic method binding refers to how one goes about binding a method name to a method body -- should this be done at compile time or at run-time?
Finally, we will once more address the issue of subclasses versus subtypes, what does it mean for one class to be used in place of another?