GeekInterview.com
Series: Subject: Topic:
Question: 29 of 37

What is run time polymorpism and complie time polymmorpism

Asked by: yaduvancy | Member Since Jan-2006 | Asked on: Jan 27th, 2006

View all questions by yaduvancy   View all answers by yaduvancy

Showing Answers 1 - 22 of 22 Answers
Prasath

Answered On : Feb 10th, 2006

Overloading is compile time polymorphism, because compiler checkes the method sigantureswhile compiling itself.(i. e: Method names, Argument types, argument creation order, etc...)

Overriding is run time polymorphism.

Yes  1 User has rated as useful.
  
Login to rate this answer.
Atul Singh Chauhan

Answered On : Feb 16th, 2006

In run time polymorphism  compiler does't know about way of execution of program,that mean decide way of execution at run time, while in compile time polymorphism compiler know about the way of execcution of program.

eg compile time polymorphism -- method overloding

    run time time polymorphism -- method overriding

  
Login to rate this answer.
samba siva chowdary

Answered On : Apr 10th, 2006

Overloading is the instance for comple time polymorphism overriding is the instance for run time polymorphism



I sincerly request the people not to give the comments with out having proper knowledge on the topic.

  
Login to rate this answer.
satheesh kumar. sriramaneni

Answered On : May 5th, 2006

Overloading related to compile time polymorphism.

Overriding related to run time polymorphism.

  
Login to rate this answer.
Faheem Lari

Answered On : May 25th, 2006

hi friend

run time polymorpism is overriding

compile time polymorpism  is overloading 

  
Login to rate this answer.
Anil Kanike

Answered On : Jun 6th, 2006

Overloading is compile time polymorphism also calledearly binding.

Overriding is runtime polymorphism also called late binding.

  
Login to rate this answer.
suryakanta mahapatra

Answered On : Jun 14th, 2006

The correct answer is:

Overloading - Compile time polymorphisim

Overriding - Runtime polymorphisim

  
Login to rate this answer.
srinivas

Answered On : Jul 24th, 2006

hai

overloading is related to compile time polymorpism->method overloading

overriding is related to run time polymorpism->method over riding 

  
Login to rate this answer.
siva kuma reddy

Answered On : Aug 9th, 2006

hi,

static polimorphisam is exibites at compile time.it is also called early binding.

dynamic polimorphism is exibites at run time ,it is also called late bindind

actually in c++:

method overloading is static polymorphisam

method overriding is dynamic polymorphism

in java:

method overloading and overriding are examples per dynamic polymorphisam only.

cheers

siva

  
Login to rate this answer.
Janakiraman.K

Answered On : Aug 16th, 2006

Overloading is a Compile time Polymorpism.Overriding is a Run time Polymorpism.

  
Login to rate this answer.
namita

Answered On : Aug 17th, 2006

Overloading is compile time polymorphism (not run time) & overriding is run time polymorphism(not compile time).

Namita Mishra

  
Login to rate this answer.
deepesh

Answered On : Oct 5th, 2006

Hi all,

Very clearly i can say that,

Compile time polymorphism (Static binding, Early binding) is : All Overloading only.

Run time polymorphism (Dynamic binding, late binding) is : Overriding only.

I hope it will satisfy you.

Thanks & Regards

Deepesh Gupta

urdeepesh @ gmail.com

  
Login to rate this answer.
Vibs

Answered On : May 3rd, 2007

I would request all to answer only of they are 100% or even more than that sure for the answer they give...people are going to read this to prepare for their interview...dont teach wrong...right?

In late binding the method which is to be called is decided at the runtime, so accordingly in a way, in overriding the decision that method of which class is to be called is decided at runtime, hence it is runtime.

In overloading the method defination, availability based on the parameters passed in the method call is checked at compile time only, so binding is done as such at compile time only, this is early bindling, hence it is compile time.

  
Login to rate this answer.
sateesh B

Answered On : Aug 13th, 2007

I agree with siva

in java method overloading and overriding are examples for dynamic polymorphisam only, also called dynamic binding

  
Login to rate this answer.
Raj Tech

Answered On : Aug 25th, 2007

I am from .net and i am totally agreeing with siva a.k.a. Polymorphism comes with two flavors.Overriding/Overloading.

Overriding :Derviced classes methods can overridethe base methods through inheritance.

Overloading :Ex:Operator overloading

What happens at Compile time :compile time will check for the validity of the callers .per se

class person
{
...
}

class employee:person
{
...
}

class main
{
person p=new employee();
p.computesal();''valid compile time itself as it's pointing to the valid object from the inheritance heirarchy.Assume this method is overriddenmethod.
}

hope everybody agrees that overloading is compile time.so i am not giving any example here.

I thought of giving the example for the siva's comment and don't want pto let any user come under any false impression before going t any interview.
thanks
raj

  
Login to rate this answer.
BL

Answered On : Sep 17th, 2007

Right answer is:

Overloading is Compile time Polymorphism
Overriding is Run time Polymorphism

  
Login to rate this answer.

On addition to this,

Overload occurs in the same class
Override occurs in the sub class

  
Login to rate this answer.
sampra

Answered On : Feb 13th, 2008

View all answers by sampra

Compile time polymorphism =Method overloading
Runtime polymorphism=Method overriding +dynamic dispatch

  
Login to rate this answer.
SarithaHarish

Answered On : Apr 24th, 2008

View all answers by SarithaHarish

i sincerely request the peple 'Don't confuse others by giving wrong answers. please answer the question when u know fully'. thaks

  
Login to rate this answer.
laikka_buddy

Answered On : May 5th, 2008

View all answers by laikka_buddy

Hi  every body

Overloading is Compile time Polymorphism
Overriding is Run time Polymorphism

Please dont  confuse  everything 

Mail  me  for any  questions   and  my  id  is   sv.vgayathri@gmail.com

  
Login to rate this answer.
madhusudan_ds

Answered On : Jun 23rd, 2009

View all answers by madhusudan_ds

I think siva got it correct. There is no such thing exists as compile time polymorphism.
Unless otherwise you run a program how does it (JRE) actually know, what to do? I mean without executing the program (be it in Java or C or C++ or any language, for that matter) there is nothing really the run time environment do about it. The Java compiler does not execute the program, but JRE does. I mean, only after executing we do know wether it is exihibitng the right behaviour or not. So it is dynamic polymorphism that exists in Java, nothing else.

  
Login to rate this answer.
divya mishra

Answered On : Dec 20th, 2013

compile time polymorphism is also called method overloading, early binding and static binding . in this compiler checks the signature of methods.

In run time polymorphism its decide which function is to call. it is also called method overriding, late binding, and dynamic binding.

  
Login to rate this answer.

Give your answer:

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

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.