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
Can we define constructor in inner class?
What is an infinite loop?
Can we catch more than one exception in a single catch block?
What is the difference between equals() and?
Give me some null interfaces in java?
What is a heavyweight component?
Is binary a low level language?
What do you mean by object?
Explain jdk, jre and jvm?
Explain about public and private access specifiers?
What is the difference between compile-time polymorphism and runtime polymorphism?
Why string is not a wrapper class?
Why Java doesn’t support multiple inheritance?
Why is the singleton pattern considered to be an anti pattern?
What is meant by 'Class access modifiers'?