Computer Science, asked by tanishanegi048, 3 months ago

What is Inheritance? Explain with an example.​

Answers

Answered by peermohamed54362
4

Answer:

Inheritance is a mechanism in which one class acquires the property of another class. For example, a child inherits the traits of his/her parents. With inheritance, we can reuse the fields and methods of the existing class.

Answered by meet2410
0
In object-oriented programming, inheritance is the mechanism of basing an object or class upon another object or class, retaining similar implementation. Also defined as deriving new classes from existing ones such as super class or base class and then forming them into a hierarchy of classes.

Do mark me as brainliest..
Similar questions