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
Explain rethrowing exceptions with an example?
What is ios :: in in c++?
Why struct is used in c++?
What is array in c++ example?
What is the difference between public, private, and protected access?
What is constructor in C++?
What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?
What are the operators in c++?
Write a struct time where integer m, h, s are its members?
Write a code/algo to find the frequency of each element in an array?
What are exceptions c++?
Can we use pointers in c++?
What are the 3 levels of programming languages?
What is meant by iomanip in c++?
What is difference between class and function?