Difference between Overloading and Overriding?

Answer Posted / janet

1. In overloading,there is a relation ship between methods
available in the same class where as in overridding,there
is relationship between a super class method and subclass
method.
2. overloading doesn't block inheritence from the
superclass where as overridding blocks inheritence.

3. in overloading,seperate methods share the same name
where as in overridding,subclass methods replaces the
superclass.

4.overloading must have different method signatures where
as overriding must have same signature.

Is This Answer Correct ?    482 Yes 79 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8; if the value of x is 4 before the nested IFs are executed, what is the value of y after the nested IFs are executed?

1810


What is anonymous object in c++?

862


Explain what are mutator methods in c++?

798


Do you know the problem with overriding functions?

837


When do we use copy constructors?

798


what is C++ objects?

931


Out of fgets() and gets() which function is safe to use?

877


What are the various access specifiers in c++?

811


Specify some guidelines that should be followed while overloading operators?

875


What is & in c++ function?

815


Do you know about C++ 11 standard?

870


Is python written in c or c++?

880


What is the use of cmath in c++?

808


What is the difference between ++ count and count ++?

857


What size is allocated to the union variable?

815