can u give some realtime example in ploymorphism? and
inheritance?
Answer Posted / abdulrazak
abstract class Person
{
public String sname(){}
Address ad;
}
class Patient extends Person
{
}
class Employee extends Person
{
}
Here in the above example Person is a class acting two ways
one Patient details info and Employee details. We are
achieving this extends Person i.e inheritence.Inheritence
provides code reusability,extensibility
| Is This Answer Correct ? | 10 Yes | 5 No |
Post New Answer View All Answers
How to read request headers from servlets?
Elucidate servlet attributes and its scope?
What are the uses of servlets?
What are some advantages of storing session state in cookies?
What are the advantages of servlets over traditional cgi?
How do you invoke a Servlet? What is the difference between doPost method and doGet method?
What are the phases of the servlet life cycle?
Servlet is pure java object or not?
Difference between get and post in java servlets?
When to use doget() and when dopost()?
How the servlet is loaded?
What is a servlet-to-servlet communcation?
Whether thread can be used in servlets?
What are the supporting protocol by HttpServlet ?
How do you invoke a servelt?