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 make sure a servlet is loaded at the application startup?
Explain the differences between jsp and servlet.
Explain the architechure of a servlet?
What is the procedure for initializing a servlet?
Can we use the constructor, instead of init(), to initialize servlet?
What do you mean by cgi in servlet?
Why the concept of single thread model interface is used?
Difference between java beans & servlets?
Explain the custom jsp tags and the beans.
What do you mean by mime type?
How can I send user authentication information while making URL Connection?
How printwriter is different from servletoutputstream?
How can we refresh automatically when new data has entered the database?
What do you mean by a filter and how does it work?
What is the functionality of actionservlet and requestprocessor?