What is the difference of override and overload?

View previous topic View next topic Go down

What is the difference of override and overload?

Post  Admin on Fri Aug 26, 2011 4:52 pm

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

Admin
Admin

Posts : 131
Join date : 2011-08-16

View user profile http://codefornongeek.forumotion.com

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum