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 are the life cycle methods of the servlet?
Why the container loads server at the application startup and how?
Tell the new features added in servletrequest interface i.e. Servlet 2.4
What are the different types of servlets?
Explain the lifecycle of a servlet?
Explain request dispatcher and its methods.
Which interface should be implemented by all servlets?
What's the servlet interface?
Explain web application directory arrangement?
What is called servlet container?
Difference between java beans & servlets?
What is servlet and list its types?
What do you understand by mime type?
Is dispatcher servlet a singleton?
What is the difference between the include() and forward() methods?