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
What is the difference between length and length () in java?
What are meta-annotations?
What is the largest long allowed by java?
What is instanceof keyword?
What is ellipsis in java?
Why is java called the platform independent programming language?
What is the += operator called?
What is object of class in java?
What is the numeric promotion?
What is difference between static variable and global variable?
What is adapter in java?
What does localhost mean?
What is compareto?
What are 3 boolean operators?
What does flag mean in java?