answersLogoWhite

0


Best Answer

Advantages of Inheritance

1) Code Re-usability

2) consumes less time

3) Without changing the super class we can add some more methods in the super class by inheriting it in the derived class

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

the advantage of single inheritance is code reusability, as one class can inherit the features of another other class.

Presumably, the larger questions around the advantages of Object-Oriented Programming are not part of this question. Please look at other question for a proper answer as to Object Oriented Programming's benefits.

The implicit part of this question is "...over multiple inheritance", as there are really only two designs for OOP.

Single inheritance's (SI) major advantages over multiple inheritance (MI) boils down to a single word: simplicity. Object inheritance trees are much simpler and clearer, as the ancestry of an object is a single path; simplicity in the design of the compiler/virtual machine, as the references to overridden methods are trivial to decode; and simplicity in the language itself, as no additional language structures are needed to clarify inheritance trees.

Overall, single inheritance languages tend to be smaller, more compact, faster, easier to code in, and simpler to implement than their multiple inheritance cousins.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Some advantages are:

a. The child class comfortably extends all behavior from its parent class

b. There is no confusion about who the parent class of this class in the inheritance hierarchy

c. All public features of the parent are available at the child's disposal

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

With inheritance, we will be able to override the methods of the base class so that meaningful implementation of the base class method can be designed in the derived class.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

it minimizes the amount of duplicate code in an application

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Benefits of inheritance in Java programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What types of inheritance in Java programming?

Java uses a hybrid system of inheritance. The designers chose a compromise between strict single inheritance and full multiple inheritance.See the related questions section below for more information.


Why you neet interface in java?

When you need the benefits of multiple inheritance while avoiding the DDD (Deadly Diamond of Death). Java doesn't allow multiple inheritance anyway.


What is the importance of inheritance in java programming?

Inheritance is one of the most important features of any object oriented programming language such as Java. This is because it makes easier to build new classes from existing classes without necessarily having to rewrite the same lines of code.


What is public inheritance in java?

Inheritance is a Java feature by which we can reuse code and programming logic from one class in another class. We implement Inheritance using the extends keyword.Ex: public class Ferrari extends Car {…}Here the Ferrari Class will extend features from the Car Class.This is Inheritance. The different types of Inheritance are:Single InheritanceMulti-Level InheritanceMultiple Inheritance (Java supports only Partial Multiple Inheritance) andHybrid Inheritance


Does java support oops concept?

Yes. Java is an Object Oriented Programming Language and it supports the OOPS concepts like Inheritance, Polymorphism etc


What are the features of core java?

Core java refers to the core or basic concepts of the Java programming language. Things like encapsulation, inheritance, multi-threading, exception handling and other basic feature of java that comes as part of the Java standard edition forms Core Java


What is the definition of Core Java?

Core java refers to the core or basic concepts of the Java programming language. Things like encapsulation, inheritance, multi-threading, exception handling and other basic feature of java that comes as part of the Java standard edition forms Core Java


Why is Java called an Object Oriented Programming Language?

Actually java is not purely object oriented.because we can use the primitive data types in Java.In java all those things or considered as classes and objects .So we are called java is an object oriented programming language...


What are the features of the core?

Core java refers to the core or basic concepts of the Java programming language. Things like encapsulation, inheritance, multi-threading, exception handling and other basic feature of java that comes as part of the Java standard edition forms Core Java


What is abstraction method in java?

Abstraction in Java or Object oriented programming is a way to segregate implementation from interface and one of the five fundamentals along with Encapsulation, Inheritance, Polymorphism, Class and Object. Abstraction in Java is achieved by using interface and abstract class in Java.


How can you write multiple inheritance program in java?

Java does not support direct multiple inheritance. You can implement partial multiple inheritance using interfaces. ex: public class ExMultInherit implements interface1, interface2, interface 3 { ... .... ...... }


How oops concept is implemented in java?

OOP stands for Object Oriented Programming. Everything in Java is an Object. Any class you create extends the Object class by default thereby making everything in Java an object. Moreover, you can use features like Inheritance, Polymorphism, Encapsulation etc which are OOP concepts thereby making Java an Object Oriented Programming Language