Other Computing Topics

Answer & solution
Answer: D under the standard polymorphic-language distinction (no official key was published)
1. Static type and runtime class are different concepts. A variable declared as a superclass reference retains that declared type while holding references to multiple subclasses. This gives a counterexample to D without implying that the compiler changes the declared type of the variable.
2. A variable in a statically typed language can have one declared static type while referring at different times to values of different compatible runtime subtypes. For example an Animal reference may refer to Dog and Cat objects. Thus D’s claim that values must have only a single runtime type in all statically typed languages is false. The other statements use the conventional distinction between declared variable types, dynamically typed values and untyped formalisms; that terminology is not uniform across every language theory.