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
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?
What is anonymous object in c++?
Explain what are mutator methods in c++?
Do you know the problem with overriding functions?
When do we use copy constructors?
what is C++ objects?
Out of fgets() and gets() which function is safe to use?
What are the various access specifiers in c++?
Specify some guidelines that should be followed while overloading operators?
What is & in c++ function?
Do you know about C++ 11 standard?
Is python written in c or c++?
What is the use of cmath in c++?
What is the difference between ++ count and count ++?
What size is allocated to the union variable?