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 servlet invoker?
What do you mean by servlet context?
What do you mean by cgi?
What is the use of servlet wrapper classes?
What do you mean by httpservlet?
How will you pass values from HTML page to the servlet?
What is the capacity the doget can send to the server?
Explain session tracking and its importance?
Is servlet synchronized?
Why is init() method is used in servlets?
Can servlet have a constructor ?
What methodology can be followed to store more number of objects in a remote server?
Write a simple servlet program to print the contents of html.
Difference between get and post in java servlets?
Write the code to get the server information in servlet.