answersLogoWhite

0


Best Answer

Runtime prolymorphism means overriding

compiletile polymorphism means overloading

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between compile time and run time polymorphism?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is Difference between dynamic polymorphism and static polymorphism with example?

Static polymorphism is used the concept of early binding or we can say compile time binding where as dynamic polymorphism used the concept of late binding or run time binding.


Define compile time polymorphism with short examples?

compiler can decide which form of the object should be invoked during compile time.this type of polymorphism is know as compile time polymorphism


What is compile time polymorphism in java?

Compile Time Polymorphism in Java is when you have the several methods with same name and different parameters and compiler has to decide how to select which method has to run based on the arguments hence the name Compile time polymorphism or method overloading.


Is late binding and dynamic binding related to polymorphism?

Late binding and dynamic binding are related to runtime polymorphism. By contrast, compile time polymorphism is known as static binding. Template functions and classes are examples of static binding because the exact type can be determined at compile time.


What is polymorphism and its types?

Polymorphism means multiple form of a function, variable or object. In Computer Science, polymorphism is a programming language feature that allows values of different data types to be handles using a common interface. There are three types : Ad-Hoc Polymosphism, Parametric Polymorphism, Subtype/Inclusion Polymorphism. Source: Wikipedia.


Why run time polymorphism is dynamic and compile time polymorphism is static?

The simple answer is that compile-time polymorphism occurs at compile time while runtime polymorphism occurs at runtime. The actual answer is that compile-time polymorphism results in the compiler generating source code on your behalf while runtime polymorphism relies on function pointers or virtual methods to determine the next instruction at runtime. Compile-time polymorphism therefore applies to template functions and classes since that is the only way the compiler can generate source code on your behalf. To achieve this, the runtime type for the template parameters must be fully-defined at compile time, even if those types have runtime polymorphic characteristics of their own. Runtime polymorphism applies to virtual methods and function pointers, both of which can be used to dynamically alter the execution path of your program. Virtual methods are made possible through virtual tables, which are essentially just arrays of function pointers. Each runtime type that derives from a base class with virtual methods provides its own virtual table, thus the runtime type determines which specific function overrides will be invoked at runtime, even if the runtime type cannot be determined at compile time. In this way you can generalise your code to work with the base type but still get the expected polymorphic behaviour whenever a derived type is passed instead.


What is the difference between design time run time and break time?

Assuming you are refering to software development: Design time - Prior to compile Run time - After compile, while program is running Break time - Pausing the execution of code during the debugging process


What is the difference between run-time error and compile error?

A run-time is an error that occurs when the program is executing (running). This is where segfaults and other horrible things happen. A compile-time error is an error that occurs when you are compiling the code. This is where code syntax and semantics are checked. You want errors to only occur here.


What is the difference between compile-time error and the run-time error?

A run-time is an error that occurs when the program is executing (running). This is where segfaults and other horrible things happen. A compile-time error is an error that occurs when you are compiling the code. This is where code syntax and semantics are checked. You want errors to only occur here.


What is the difference between runtime errors and compile time error?

Compile time errors occur do to syntax errors (such as forgetting a semi-colon at the end of a line) and they prevent your program from even compiling. A runtime error is an error in logic in your program. Your program will compile, however while running the program it will throw an error because it tries to do something illegal (such as dividing by 0).


Is overriding done at compile time or run time?

compile time


Difference between statically typed language and dynamically typed language?

Statically typed languages check type of variable at Compile time vs Dynamically typed language check type at run time