How's method overriding different from overloading?

How's method overriding different from overloading?

Difference between overriding and overloading:-
1:-When overriding, you change the method behavior for a derived class. Overloading simply involves having a method with the same name within the class. 
2:-overriding keyword cahnge behavour in derive class with same signature 

Overloading means same name but passing different datatype or different number arguments within the same class

3:-Method overloading means same method name but different 
parameters. Method overriding means same method name and 
parameters also same. In method overloading method will 
differentiate with parameters name and in method overriding 
method will differentiate with method signature


By:kamal
Date:2013-10-10 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related C Links

C interview questions and answers for experienced and fresher