Computer Science, asked by vishnu55153, 7 months ago

definition of inheritance in java​

Answers

Answered by gauthamsudhir
2

Inheritance can be defined as the process where one class acquires the properties (methods and fields) of another. With the use of inheritance the information is made manageable in a hierarchical order.

The class which inherits the properties of other is known as subclass (derived class, child class) and the class whose properties are inherited is known as superclass (base class, parent class).

Syntax:

Attachments:
Answered by munazzakhalidarf
1

Answer:

Inheritance in java is a mechanism in which an object acquires all the properties and behaviors of a parent object.

Explanation:

The idea behind inheritance in java is that you can create new classes that are built upon existing classes when you inherit from an existing class, you can reuse methods and fields on the parent class.

Hope it will help!!!!

Thanks..

Similar questions