GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  OOPS
Go To First  |  Previous Question  |  Next Question 
 OOPS  |  Question 20 of 258    Print  
What is the difference between "overloading" and "overridding"?

  
Total Answers and Comments: 7 Last Update: October 29, 2009   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Anonymous
 
overloading refers to -same name but different definitions and parmeters. 
Overriding refers to --'replacement' of methods.

Above answer was rated as good by the following members:
prabhakar.n
July 07, 2005 07:06:54   #1  
Anonymous        

RE: What is the difference between "overloading" and "overridding"?
overloading refers to -same name but different definitions and parmeters.
Overriding refers to --'replacement' of methods.

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
July 23, 2005 01:49:18   #2  
Girish        

RE: What is the difference between "overloading" and "overridding"?
In overloading you are extending the definition .
ie if you over load a operator + whith a object then
them + can be used to perform the basic additoin and defintion given at the time of operator overload .

The overriding which used in Inheretence . ie if you want to change the definition .

 
Is this answer useful? Yes | No
September 01, 2005 12:07:45   #3  
Amit Banerjee        

RE: What is the difference between "overloading" and "overridding"?
Function Overloading is the implementation of static polymorphism where same function name having different defenitions for different uses.

Function overriding is applicable for dynamic polymorphism where where the function name and the definition are same but the function call is decided at the run time according to the type of object reference.

 
Is this answer useful? Yes | No
October 05, 2005 03:24:55   #4  
ravi verma        

RE: What is the difference between "overloading" and ...
overloading
 
Is this answer useful? Yes | No
March 02, 2006 05:56:28   #5  
prince        

RE: What is the difference between "overloading" and ...

overloading:

fuctions with same name but they differ by some parameters like no. of arg.

type of arg.

overriding:

any local function can override global functin


 
Is this answer useful? Yes | No
January 15, 2007 05:01:18   #6  
me        

RE: What is the difference between "overloading" and "overridding"?
overloading is mainly for operators and overriding is for functions

 
Is this answer useful? Yes | No
October 28, 2009 06:34:24   #7  
attiq.ur.rehman92 Member Since: October 2009   Contribution: 1    

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

Overloading is related to the use of a function or an operator. For example you can use a function for adding some integers as well as floats so this function is overloaded as it works for two different kind of inputs.


Where as overiding is in the case of classes in the object oriented programming or modeling. In this perspective you make a new class interacting with an existing one by implementing some new or restricted feature. For example you click to draw a shape from the menu but in the view class and further in every class (line rectangle triangle and circle etc) there exists a specific draw function.


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape