INHERITANCE
1.Inheritance in java is a mechanism in which one object acquires all the properties and behaviors of parent object.
2.Inheritance represents the IS-A relationship, also known as Parent-Child relationship.
3.The keyword extends indicates that you are making a new class that derives from an existing class
Uses of Inheritance:
Print PDF1.Inheritance in java is a mechanism in which one object acquires all the properties and behaviors of parent object.
2.Inheritance represents the IS-A relationship, also known as Parent-Child relationship.
3.The keyword extends indicates that you are making a new class that derives from an existing class
Uses of Inheritance:
- For Method Overriding (So Runtime Polymorphism).
- For Code Reusability.
No comments:
Post a Comment