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 an objects lock and which objects have locks? : Java thread
What type of language is java?
What are the advantages and disadvantages of reference counting in garbage collection?
What are the different http methods?
What is functional interface in java example?
What is method reference in java?
When can you say a graph to be a tree?
what is the difference between the methods sleep() and wait()? : Java thread
Why singleton pattern is better than creating singleton class with static instance?
What is the ==?
Why is core java important?
What do you mean by scope of variable?
Does variable declaration allocate memory?
What are the 6 mandatory procedures for iso 9001?
Convert Binary tree to linked list.