search
Login

Categories


C Books Guide and List
C++ Books Guide and List
Best Java Books

3.8k questions

4k answers

117 comments

10.7k users

0 votes
150 views
asked Guru 39.1k points 10 21 32
reshown by

2 Answers

0 votes
Inheritance is a mechanism in which one object acquires all the properties and behaviour of another object of another class. It represents IS-A relationship. It is used for Code Resusability and Method Overriding.
answered Guru 27.1k points 31 47 93
0 votes
•             Inheritance is the process by which objects of one class acquire the properties of objects of another class.

•             A class that is inherited is called a superclass.

•             The class that does the inheriting is called a subclass.

•             Inheritance is done by using the keyword extends.

  The two most common reasons to use inheritance are:

o             To promote code reuse

o             To use polymorphism
answered Guru 39.1k points 10 21 32

Related questions

0 votes
1 answer 14 views
14 views
asked john Guru 27.1k points 31 47 93
0 votes
1 answer 16 views
16 views
asked john Guru 27.1k points 31 47 93
0 votes
1 answer 10 views
10 views
asked rajesh Guru 39.1k points 10 21 32
0 votes
2 answers 23 views
23 views
asked smith Geek 15.3k points 14 39 58
0 votes
1 answer 44 views
...