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
What is the difference between sendredirect() and forward() in a servlet?
What is servlet attributes and their scope?
How can we invoke another servlet in a different application?
What is the difference between genericservlet and httpservlet
Explain jsessionid and when is it created?
List the Different types of servlet?
Is java servlet still used?
What is servlet and its life cycle?
Explain their methods? Tell me their parameter names also have you used threads in servlet?
What is ServletContext object?
What do you mean by cgi in servlet?
Explain the servlet filter.
What is a cookie What is the difference between session and cookie
What is the use of httpservletresponsewrapper?
What are the different types of servlets?