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 do you mean by session tracking?
When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?
What is load-on-startup in servlet?
How can the session in servlet be destroyed?
What methodology can be followed to store more number of objects in a remote server?
What are the drawbacks of cgi?
Explain how to improve Servlet Performance?
How the servlet is loaded?
Difference between GET and POST?
Why is http protocol called as a stateless protocol?
What is the difference between portlet and servlet?
What are the types of protocols supported by httpservlet ?
What is meant by session? Tell me something about httpsession class?
What are the servlet events?
How can we perform any action at the time of deploying the project?