What is the difference between "overloading" and "overriding"?

Questions by suji   answers by suji

Editorial / Best Answer

Answered by: Richa

  • Sep 28th, 2005


Overloading a method (or function) in C++ is the ability for functions of the same name to be defined as long as these methods have different signatures (different set of parameters). Method overriding is the ability of the inherited class rewriting the virtual method of the base class.

Showing Answers 1 - 3 of 3 Answers

Richa

  • Sep 28th, 2005
 

Overloading a method (or function) in C++ is the ability for functions of the same name to be defined as long as these methods have different signatures (different set of parameters). Method overriding is the ability of the inherited class rewriting the virtual method of the base class.

priya

  • Mar 4th, 2006
 

overloading: the same function can perform different operations.overridding: the derived class can rewrite the content of the base class.

swarn kant

  • Mar 13th, 2006
 

All the above answers are right this is one more refinement.

overridding is runtime polymorphism while overloading is compile time polymorphism. 

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions