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 interface be private in java?
What are the data types supported by java? What is autoboxing and unboxing?
Does java support multiple inheritance or not?
Can I override protected method in java?
Is there any case when finally will not be executed?
Can we execute a program without main?
why using interface interface ?
What is break and continue statement?
What is matcher in java?
What is the difference between static method and instance method in Java?
How would you format a date in java? I.e. In the ddmmyyy format?
What are the 6 functions?
What are the four pillars of java?
What is method in java with example?
Does A Class Inherit The Constructors Of Its Superclass?