why java does compile time polymorphism at run time ?
Answer Posted / 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 View All Answers
what is the difference between a threads start() and run() methods? : Java thread
How to perform quicksort in java?
What happens if we override private method?
Does importing a package imports its sub-packages as well in java?
What is final keyword?
What is square root in java?
What is the ==?
What classes of exceptions may be caught by a catch clause in java programming?
What are different types of encoding?
Why main() method is public, static and void in java ?
What is an association?
What are extraneous variables examples?
What is singleton class in java and how can we make a class singleton?
How do you define a singleton class?
Does java support multiple inheritances?