Difference between Overloading and Overriding?

Answer Posted / pratimakiran

Overloading doesn't block Inheritence from the
superclass where as Overriding blocks is Inheritence.


Overloading method has different Parameters but same name
whereas Overriding is just the implementation of method
define Base Class.

Overloading Two or more functions having same name but
different methods i.e arguements or return types.

Overriding means use same name function name
with same parameters of the base class in the derived class.

Is This Answer Correct ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the exit function in c++?

544


Can notepad ++ run c++?

548


What is :: operator in c++?

582


What is meant by forward referencing and when should it be used?

560


Why is it called c++?

587






Explain 'this' pointer and what would happen if a pointer is deleted twice?

613


What is insertion sorting?

671


What is a Default constructor?

924


Keyword mean in declaration?

600


Where are setjmp and longjmp used in c++?

626


What is the use of c++ programming language in real life?

569


What ANSI C++ function clears the screen a) clrscr() b) clear() c) Its not defined by the ANSI C++ standard

593


Can c++ be faster than c?

604


How do you clear a set in c++?

605


What is a .lib file in c++?

574