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
Why is servlet used?
What do you mean by request dispatcher in servlet? Also explain its methods.
What is servlet and its use?
How does java thread pool work?
How do you communicate in between Applets and Servlets?
What is servlet? Explain
How do we call one servlet from another servlet?
What if we pass negative value in load-on-startup?
What does the term localization refer to?
Can we use threads in Servlets?
What is called Scriptlet?
How can you create a session in servlet?
What is war file?
What is the use of welcome-file-list?
I have a requirement Here we have a ResultSet object that will contain 50 records i need to print those recors in to a webpage(i.e; view according to MVC architectures that mybe servlet or jsp) . Here i need to print the records 10 per page that is 1 to 10 in page one and 11 to 20 in page two like remaining will be appeared in other pages we need to display those page numbers whenever we click on that page number we will go to that page and display 10 records like we will display 5 pages it is like this << 1 2 3 4 5 next >>