Difference between Overloading and Overriding?
Answer Posted / samba
Overloading: We can use same method name and different
arguments, number of arguments and type of arguments, and it
is also called as Compiletime Polymorphism, EarlyBinding and
StaticBinding.
Ex: int add(int a,int b);
int add(int a, float b);
float add(int a, float b, float c);
Overriding: We can use same method name and same arguments
to perfrom our own functionality, and it is also called as
Runtime Polymorphism,LateBinding and Dynamic Binding.
Ex: int add(int,int);
int add(int,int);
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are the advantages of using const reference arguments in a function?
What is scope resolution operator in c++ with example?
What is the best free c++ compiler for windows?
Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?
Explain static and dynamic memory allocation with an example each.
Which is better turbo c++ or dev c++?
When do we run a shell in the unix system? How will you tell which shell you are running?
What is a friend function in c++?
What would happen on forgetting [], while deallocating an array through new?
What is data types c++?
How would you find out if a linked-list is a cycle or not?
Can char be a number c++?
Is map sorted c++?
What are the basic data types used in c++?
What does extern mean in a function declaration in c++?