Advantages disadvantages and application of inheritance in java
Answers
Answered by
2
Not just in Java, but in GeneralInheritance in Object Oriented Programming has lot of advantages… One of the key benefits of inheritanceis to minimize the amount of duplicate code in an application by sharing common code amongst several subclasses.
Answered by
0
Hey !
Inheritance ensures the closeness with the real-world models.
Allows the code to be reused as many times as needed. The base class once defined and once it is compiled, it need not be reworked.
We can extend the already made classes by adding some new features.
Inheritance is capable of simulating the transitive nature of real-world’s inheritace, which in turn saves on modification time and efforts, if required.
Inheritance ensures the closeness with the real-world models.
Allows the code to be reused as many times as needed. The base class once defined and once it is compiled, it need not be reworked.
We can extend the already made classes by adding some new features.
Inheritance is capable of simulating the transitive nature of real-world’s inheritace, which in turn saves on modification time and efforts, if required.
Similar questions