Difference between Compile-time Polymorphism and Run-time Polymorphism





Distinguish, differentiate, compare and explain what is the difference between Compile time Polymorphism and Run time Polymorphism. Comparison and Differences.

Differences between Compile-time Polymorphism and Run-time Polymorphism

S.No. Compile-time Polymorphism Run-time Polymorphism
1 It is implemented through method overloading. It is implemented through method overriding.
2 It is executed at the compile time since the compiler knows which method to execute depending on the number of parameters and their data. It is executed at the run time since the compiler does not know the method to be executed, whether it is the base class method that will be called or the derived class method.
3 It is also referred as static polymorphism. It is also referred as dynamic polymorphism.


Tags:

Difference between Run-time Polymorphism vs Compile-time Polymorphism

Compile-time Polymorphism vs Run-time Polymorphism

Differences between Run-time Polymorphism vs Compile-time Polymorphism

Image Credits: Freepik

Spreading Knowledge Across the World

  • United States
  • United Kingdom
  • India
  • Nigeria
  • Philippines
  • Pakistan
  • Nepal
  • Singapore
  • Indonesia
  • Bangladesh
  • Ghana
  • United Arab Emirates
  • Kenya
  • Canada
  • Malaysia
  • Australia
  • Iran
  • South Africa
  • Uganda
  • France
  • Ireland
  • Unknown Region
  • Egypt
  • Tanzania
  • Ethiopia
  • Thailand
  • Sri Lanka
  • Cameroon
  • Hong Kong
  • Spain
  • Vietnam
  • New Zealand
  • Japan
  • Brazil
  • Saudi Arabia
  • Zambia
  • Czechia
  • Italy
  • Russia
  • Myanmar (Burma)
  • Netherlands
  • Germany
  • Romania
  • Mexico
  • Rwanda
  • Sierra Leone
  • Turkey
  • Zimbabwe
  • Poland
  • Iraq
  • Cyprus
  • Algeria
  • Liberia
  • Greece
  • Jamaica
  • Malawi
  • Qatar
  • Portugal
  • South Korea
  • Argentina
  • Colombia
  • Morocco
  • Peru
  • Kuwait
  • Lithuania
  • Finland
  • Somalia
  • Israel
  • Bulgaria
  • Chile
  • Hungary
  • Trinidad & Tobago
  • Uzbekistan
  • Ukraine
  • Sweden
  • Kazakhstan
  • Norway
  • Macedonia
  • Benin
  • Switzerland
  • Oman
  • Botswana
  • Belgium
  • Ecuador
  • Slovakia
  • China
  • Croatia
  • Brunei
  • Serbia
  • Papua New Guinea
  • Bahrain
  • Guyana
  • Denmark
  • Lesotho
  • Lebanon
  • Jordan
  • Azerbaijan
  • Latvia
  • Cambodia
  • Namibia
  • Mauritius
  • Austria
  • Mongolia
  • Albania
  • Libya
  • Gambia
  • Taiwan
  • Bhutan
  • Venezuela
  • Dominican Republic
  • Tunisia
  • Luxembourg
  • Bosnia & Herzegovina
  • Guatemala
  • Solomon Islands
  • Guam
  • Costa Rica
  • Yemen
  • Bolivia
  • and many more ...