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 can we include static files in the jsp page?
What is preinitialization of a servlet?
Explain the difference between a web server and a web container?
What is servlet name in web xml?
What is servlet and its types?
Does servlet have main method?
Explain how to improve Servlet Performance?
List the Different types of servlet?
What is a servlet context?
Who is responsible to create the object of servlet?
What is the difference between encodeRedirectUrl and encodeURL?
Explain the working of service() method of a servlet.
What is servlet configuration?
What do you mean by singlethreadmodel interface?
What is the difference between genericservlet and httpservlet