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’s the difference between forward() and sendredirect() methods?
What is the use of servlet wrapper classes?
Is servlet a framework?
What are advantages of servlets over cgi?
How do we translate jsp?
How do you configure a centralized error handler in servlets?
What are the life cycle methods of the servlet?
What is war file?
Explain servlet life cycle?
Why jsp is better than servlet?
How to get the IP address of client in servlet?
How many objects of a servlet is created?
What is the life cycle of a servlet?
Should I override the service() method?
What's the advantages using servlets than using cgi?