can u give some realtime example in ploymorphism? and
inheritance?
Answer Posted / suresh
inheritance is hierarchy of class,that is one class derived
from another class
example:
grant father
--father
--son
polymorphism is the ability to take more than one form
example:
compile time polymorphism
--method overloading
people can act many role in the world
home:father
company:employee
run time polymorphism
--method overriding
dog is a class
It contains smile method
Is This Answer Correct ? | 36 Yes | 15 No |
Post New Answer View All Answers
Can you explain in detail 'javax.servlet' package?
Can we override destroy method in servlet?
What is java servlet?
What are the differences between forward() method and sendredirect() methods?
What are the life cycle methods of a servlet?
Is it good idea to create servlet constructor?
What is the life-cycle of servlets?
What is load-on-startup in servlet?
How printwriter is different from servletoutputstream?
Which http method is said to be non-idempotent and idempotent?
Difference between GET and POST?
What is a servlet-to-servlet communcation?
Whether we can get deadlock situation in servlets?
How is a servlet implemented in code?
What are the features added in Servlet 2.5?