Advanced
Web & Software Development
Q83 / 100
What is the difference between compile-time and runtime polymorphism?
Correct! Well done.
Incorrect.
The correct answer is B) Compile-time (static): method overloading, generics — resolved at compile time. Runtime (dynamic): method overriding via virtual dispatch — resolved at runtime based on actual object type
B
Correct Answer
Compile-time (static): method overloading, generics — resolved at compile time. Runtime (dynamic): method overriding via virtual dispatch — resolved at runtime based on actual object type
Explanation
Compile-time (early binding): C++ templates, Java generics, function overloading. Runtime (late binding): virtual method calls through vtables/dispatch tables. Java interfaces, C++ virtual enable runtime polymorphism.
Progress
83/100