explain the concept of inheritance with an example?
Answer Posted / kkr
Inheritance is the process of creating the classes from existing classes by using 'extends' key word.
It is like IS-A relationship between the classes.
eg : Parent and child relationship. we cal parent class as super class and child class will be subclass.i.e the subclass will have all the members of super class.
Adv : Reusability of the code.i.e productivity will be increase.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Differentiate between array list and vector in java.
Can private members of a base class are inheritable justify?
What do you understand by the term string pool?
Why is sizeof not a function?
Describe method overriding
What are the five major types of reference sources?
Can we inherit a class with private constructor?
What are the advantages of compiled language?
How do we access static members in java?
What is difference between calling start() and run() method of thread?
What is the difference between heap memory and stack memory?
I am unable to find or learn about print command. I have a graphical program in core java in applet but i want to give print command but i have coding for that so if anyone know about this plz mail me on avdhesh_chauhan007@yahoo.co.in
What is a stringbuilder?
Which class is the superclass for every class in java programming?
Which container method is used to cause a container to be laid out and redisplayed in java programming?