GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Placement Papers  >  Manhattan Associates  >  Java
Go To First  |  Previous Question  |  Next Question 
 Java  |  Question 4 of 17    Print  
What is the difference between OVERRIDING and OVERLOADING


  
Total Answers and Comments: 6 Last Update: October 12, 2007   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
May 09, 2005 07:34:30   #1  
Hari        

RE: What is the difference between OVERRIDING and OVERLOADING
Overriding - same method names with same arguments and same return types associated in a class and its subclass. 
 
Overloading - same method name with different arguments, may or may not be same return type written in the same class itself.

 
Is this answer useful? Yes | No
June 13, 2005 02:57:11   #2  
varsha        

RE: What is the difference between OVERRIDING and OVERLOADING
Ya.. u can also sau that Overloading is static Polymorphism and Overridding is dynamic polymorphism.
 
Is this answer useful? Yes | No
July 03, 2005 11:03:55   #3  
Sony        

RE: What is the difference between OVERRIDING and OVERLOADING
the best answer is that both overloading and over-riding are different aspects of polymorphism.......;-) 
 
static/early binding polymorphism:overloading 
dynamic/late binding polymorphism:overriding 

 
Is this answer useful? Yes | No
February 07, 2007 07:08:11   #4  
Jayaprabhakar        

RE: What is the difference between OVERRIDING and OVER...
Overloading is compile time binding, where as overriding is dynamic binding.A good example that differentiates between overloading and overriding is shown here.

overriding is compile time binding

 
Is this answer useful? Yes | No
October 06, 2007 13:47:59   #5  
ramana        

RE: What is the difference between OVERRIDING and OVER...
Please clarify the difference
class A
{
void calc()
{
}
int calc(int)
{
}
}
class B:public  A
{
void calc()
{
}
}

This is just an abstract of the program.
If we have a program like this and an object of class B is created and we call b.calc will the compiler first call the method calc of super class or sub class?
What will be the effect of virtual key word on this program?
Is the calc function over loaded?
Can we say this as an example for over riding?

 
Is this answer useful? Yes | No
October 11, 2007 10:06:41   #6  
Blah        

RE: What is the difference between OVERRIDING and OVER...
Please clarify the difference
class A
{
void calc()
{
}
int calc(int)
{
}
}
class B:public  A
{
void calc()
{
}
}

This is just an abstract of the program.
If we have a program like this and an object of class B is created and we call b.calc will the compiler first call the method calc of super class or sub class?
What will be the effect of virtual key word on this program?
Is the calc function over loaded?
Can we say this as an example for over riding?

-------------------------------------------------------------------------
In this case, when class B calls a.calc the complier will first look at the signature of calc. Class B needs to either call a.calc() or a.calc(int).

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape