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

3,749 questions

4,049 answers

114 comments

10,705 users

What is Inheritance?

0 votes
136 views
asked Dec 20, 2013 by rajesh Guru (39,140 points)
reshown Oct 6, 2014 by admin

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 Dec 20, 2013 by john Guru (27,140 points)
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 Dec 29, 2013 by rajesh Guru (39,140 points)

Related questions

0 votes
1 answer 14 views
14 views asked Jan 9, 2014 by john Guru (27,140 points)
0 votes
1 answer 15 views
0 votes
1 answer 8 views
8 views asked Dec 20, 2013 by rajesh Guru (39,140 points)
0 votes
2 answers 22 views
22 views asked Dec 31, 2013 by smith Geek (15,340 points)
0 votes
1 answer 41 views
...