Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


why java does compile time polymorphism at run time ?

Answers were Sorted based on User's Feedback



why java does compile time polymorphism at run time ?..

Answer / bharathi

no..compile time polymorphism is static binding and it s
overloading concept.. dynamic binding is the overridding
concept and is meant as runtime polymorphism. jvm determines
the method to call at runtime and not in compile time. A
runtime polymorphism acts by inheritance and virtual functions.

Is This Answer Correct ?    21 Yes 3 No

why java does compile time polymorphism at run time ?..

Answer / pratiksha

Compile time polymorphism-->i.e.method ovrloading and it is
done at compile time.Because in overloading same method
names having different signature and compiler can decide which
method to run by checking data type of arguments.

Is This Answer Correct ?    4 Yes 3 No

why java does compile time polymorphism at run time ?..

Answer / sarath

polymorphism can sub divided into two
1) Static Binding or Compile Time Checking
2) Dynamic Binding or Rum time Checking

Static Binding: method Overloading is the example.
The checking and assign process is done at
compile time itself. If any error occur it
will throw

Dynamic Binding: I have an Interface called Bicycle and it
is implemented in some sub classes
( like MRF.class ). We can create Object
like Bicycle bicycle = new MRF();

Is This Answer Correct ?    1 Yes 0 No

why java does compile time polymorphism at run time ?..

Answer / ali

in java all the non-static functions or instance functions are implicit virtual i.e an object is bound with their functionality at run time
so therefore in java their is no compile time polymorphism

Is This Answer Correct ?    1 Yes 0 No

why java does compile time polymorphism at run time ?..

Answer / aditya

Constructors,static & private methods are bind statically by compiler...so overloading of these things can be thought as compile time polymorphism.

Is This Answer Correct ?    0 Yes 0 No

why java does compile time polymorphism at run time ?..

Answer / sarbbottam bandyopadhyay

compile time polymorphism is nothing but dynamic binding.
For overloaded method java uses static binding.
For overridden method Java uses dynamic binding.
Weather the method of the base class or the method of parent class will get invoked depend on the method invocation. i.e. which object is invoking the method, which class this object is an instance of.

Refer the below link.
http://download.oracle.com/javase/tutorial/java/IandI/polymorphism.html

Is This Answer Correct ?    5 Yes 16 No

Post New Answer

More Core Java Interview Questions

Mention the default values of all the elements of an array defined as an instance variable.

0 Answers  


What is the integer of 16?

0 Answers  


Is java an ide?

0 Answers  


Can we change the scope of the overridden method in the subclass?

0 Answers  


How are this() and super() used with constructors in java programming?

0 Answers  


give me the answer of this code class A extnds String This code we can write r not in Java? Explain?

4 Answers  


What occurs when an object is constructed?

0 Answers  


Explain the relationship between the Canvas and Graphics class?

1 Answers  


Can we compare two strings in java?

0 Answers  


FOR EXAMPLE WE R HAVING TWO LIST ELEMENTS ..BOTH LISTS CONTAINS ID,NAME,PLACE ..I NEED TO COMPARE BOTH IDS IN TWO LISTS,IF ID'S R SAME MEANS WE HAVE ADD THE DETAILS(LIKE NAME,PLACE) TO MAP...HOW IS POSSIBLE ?CAN ANY ONE SUGGEST?

1 Answers  


Brief the life cycle of an applet.

1 Answers  


Why method overriding is used?

0 Answers  


Categories