What is the difference of override and overload?
Page 1 of 1
What is the difference of override and overload?
overloading is the concept that defining a method more than once with different arguments....the return type may or may not be same but the name of the class should be same
ex: int add(int a,int b)
float add(float a,float b);
overiding means redefining the method in derived class which has already been defined in base class
ex: int add(int a,int b)
float add(float a,float b);
overiding means redefining the method in derived class which has already been defined in base class
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|