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 are the six ways to use this keyword?
How many types of memory areas are allocated by jvm?
What is the base class of all classes?
What is loop in java?
What is google full form?
Is a string literal?
What is an accessor?
What is use of inner class in java?
What is difference between an object and a class?
Why does java doesnt suuport unsigned values?
What is difference between checked and unchecked exception in java?
What is valid keyword in java?
What is collection sort in java?
What is try-with-resources in java?
What is a values collection view ?