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
Search for: what is pair in c++?
Do the names of parameters have to agree in the prototype, definition, and call to the function?
What is a down cast?
Differentiate between late binding and early binding. What are the advantages of early binding?
Can we define function inside main in c++?
If a header file is included twice by mistake in the program, will it give any error?
Would you rather wait for quicksort, linear search, or bubble sort on a 200000 element array? (Or go to lunch...) a) Quicksort b) Linear Search c) Bubble Sort
What do you mean by translation unit?
What is ios flag in c++?
What is namespace & why it is used in c++?
Is multimap sorted c++?
What is virtual base class?
What do you mean by storage classes?
Should I learn c or c++ first?
Can a class be static in c++?