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's the difference between authentication and authorization?
What is cgi?
What are Servlets?
Hi frnd can i any one kindly can post for me portlet,hibernate and spring example application and with flow explantion configuration using Jdeveloper.and related links ar tutorials kindly please send me .its urgent for me .thanks in advance...........else can any one send to kondaiah.goddeti@gmail.com
What is the use of attribute in servlets?
What is difference between cookies and httpsession?
How the servlet is loaded?
What is load-on-startup in servlet?
Which are the different ways you can communicate between servlets?
Explain the methods of request dispatcher in servlet?
What is the use of httpservletrequestwrapper and httpservletresponsewrapper?
What do you mean by interservlet communication?
Which event is fired at the time of setting, getting or removing attribute from application scope?
Difference between java beans & servlets?
Explain the jar and war files in servlet?