Computer Science, asked by vaishnavid772, 4 months ago

What is inheritance? Explain the need of inheritance?

Answers

Answered by prekshaaora
3

Explanation:

the capability of one class to inherit the capability of another class is known as inheritance

Inheritance allows us to reuse of code, it improves reusability in your java application. Note: The biggest advantage of Inheritance is that the code that is already present in base class need not be rewritten in the child class.

Answered by MrVolcano
56

\huge{\underline{\underline{\boxed{\sf{\purple{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. Hence, inheritance facilitates Reusability and is an important concept of OOPs.

Similar questions