Difference Between Compile Time And Runtime Polymorphism

Share Your Love

In this post, I am discussing the difference between compile Time And Runtime Polymorphism.

The meaning of polymorphism stands for “Poly mean Many” + “Morph means Forms”. It is one of the features of object-oriented programming having the ability to take more than one form.

Today we will see, the main two types of polymorphism.

  • Compile Time Polymorphism
  • Runtime Polymorphism
Compile-Time PolymorphismRun-Time Polymorphism
It’s also called early binding or static polymorphism.It’s also called late binding or dynamic binding polymorphism
The method is called or invoked during compile time.The method is called/invoked during run time.
The implementation of compile-time via function overloading and operator overloading.The implementation of Run-Time via function overloading and operator overloading
For example, method overloading and operator overloading. Many methods having the same name but different numbers or types of arguments.For example, method overriding. Many methods having a similar name and the same prototype.
Faster execution, because method discovery is done during compile-time.Slower execution, because method discovery is done during run-time.
Difference Between Compile-Time & Run-Time

Join Our Community

Join our WhatsApp Group To know more about Programming Language tips, tricks and knowledge about and how to start learning any programming language.

Share Your Love
Avatar photo
Lingaraj Senapati

Hey There! I am Lingaraj Senapati, the Founder of lingarajtechhub.com My skills are Freelance, Web Developer & Designer, Corporate Trainer, Digital Marketer & Youtuber.

Articles: 411

Newsletter Updates

Enter your email address below to subscribe to our newsletter