Difference between Overloading and Overriding?

Answer Posted / ravi kolate(ty)

overloadind is the method in which have same function name
and return type but it has different number of passing
argument.
float a(float a,int a)
{
float a(float num)
{
//code
}
}
while in overriding method their are same function name
same return type and same parameter passing passing to
parent class to child class.
in java their is tedius problems in method overriding ,to
solve problem java introduce a interface.

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the full form nasa?

597


What is conditions when using boolean operators?

607


What is atoi in c++?

570


Define anonymous class.

627


When to use “const” reference arguments in a function?

584






What are the two types of comments, and how do they differ?

576


What is #include iostream?

743


How the virtual functions maintain the call up?

610


What is the difference between an array and a list?

588


Ask to write virtual base class code?

2152


How to declare an array of pointers to integer?

586


How do you invoke a base member function from a derived class in which you have not overridden that function?

584


Explain deep copy and a shallow copy?

615


What is a list c++?

577


Explain pass by value and pass by reference.

597