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
What is cookie in servlet?
If a servlet is not properly initialized, what exception may be thrown?
How can you create a session in servlet?
What are the benefits of using servlet over cgi?
How we can get ip address of client in servlet?
What is Client-Server Computing?
Which protocol will be used by browser and servlet to communicate
Why HttpServlet class is declared abstract?
Write a command to get actual path of a servlet to the server?
How can you start a jta transaction from a servlet deployed on jboss?
What is the life-cycle of servlets?
Can we use threads in Servlets?
What is servlet and how it works?
When is the servlet instance created in the life cycle of servlet? What is the importance of configuring a servlet?
Why session tracking is needed?