What is the difference between "overloading" and "overridding"?

This question is related to TCS Interview

Showing Answers 1 - 6 of 6 Answers

rajaraman

  • Nov 5th, 2005
 

in overloading,the number of arguments for a function vary

where as in overriding,the function name and the arguments  used in two different classes are same

  Was this answer useful?  Yes

somshekar

  • Sep 27th, 2006
 

overloading:  by overloading a function we can use the same function for performing similar operations on different data types.

overriding: by overrriding a function we can use the same function name and parameters but perform different operations on data types.

  Was this answer useful?  Yes

Adiraju Santosh Vishal

  • Sep 28th, 2006
 

yes, The difference between overloading and overriding is that1.Overloading:It occurs when two methods belong to same class.2.Overriding occurs when there is inheritance.3.In overriding the signature must be same but here just the code changes.4.Overloaded methods should differ in any one of the following aspects a.Number of arguements,b.Type of arguements,c.Order of arguements.

  Was this answer useful?  Yes

pavankishore

  • Nov 28th, 2006
 

overloading is class declaration.

overriding is methid declaration.

  Was this answer useful?  Yes

SUVI_1990

  • Jun 13th, 2009
 

Overloading, an assignment operator is overloaded in a base class, it cannot be inherited in a derived class. And overriding is to create a new class using derived class.

  Was this answer useful?  Yes

nebudotcom

  • Aug 5th, 2010
 

Overloading:
Using more than one function with the same name but with different signatures
 
Overriding:
* Two functions having same name located in two different classes
* When an object is created for subclass, it will override the baseclass ie the subclass function will get evoked.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions