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

Explain how to initialize a const data member.

601


Explain static and dynamic memory allocation with an example each.

650


What is isdigit c++?

584


What does flush do?

568


Can c++ be faster than c?

608






Which is better c++ or java?

573


How does code-bloating occur in c++?

760


What is difference between n and endl in c++?

590


what is C++ objects?

680


What are the two shift operators and what are their functions?

567


What is meaning of in c++?

678


Give an example of run-time polymorphism/virtual functions.

568


What are the advantages of c++? Explain

607


Which field is used in c++?

646


When does a 'this' pointer get created?

630