answersLogoWhite

0


Best Answer

OOP, is to write software in objected-oriented fashion. It will be very difficult to do this with a non-objected oriented computer language. Any objected oriented computer language must have INHERITANCE feature to be an OO language. Actually, to be called object-oriented of anything, inheritance is a must. Without inheritance, it will not be OO (of anything).

Like any feature, characteristic, or property of "something" (oop in this question), the "importance" may only be concluded or derived from understanding it and perhaps even applying it. Inheritance is built into OOP, try to apply it, then you will understand its importance and perhaps discover its weakness!

User Avatar

Wiki User

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

Wiki User

12y ago

You don't need inheritance. But it is often useful to create new classes of objects from existing classes. Rather than duplicate the code, you can inherit the generic code from the existing class and modify its behaviour in the derived class to suit more specific needs. The original class is then known as a base class, and you can derive several different classes from the same base class, which creates a "kind of" relationship between the derived classes and their common base class. Thus different classes can be treated as the same kind of object: the base class.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

This is a trick question. .Net has no inheritance per se.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago
  1. To centrally place logic that is common to multiple places
  2. To enable reuse and to reduce code duplication
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why Inheritance is required in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What does java not support?

Java does not support multiple inheritance.......


What is ambiguity in multiple inheritance?

Java does not support multiple inheritance


What kind of inheritance is not allowed in java?

Java does not allow the multiple inheritance of concrete classes, though it does allow a "hybrid" inheritance of one concrete class and multiple interfaces.


What is problem in multiple inheritance?

Java does not support direct multiple Inheritance. Harder to implement, not every language support it: C++ does, Java does not.


Give the structure of multiple inheritance?

Java does not support multiple inheritance. It is done with the help of interfaces in java. a class can implement n number of interfaces, thus showing multiple inheritance. but a class cannot extend multiple classes in java.


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


How ploymorphism and inheritance is different from that in Java and c plus plus?

C++ allows multiple inheritance while Java does not. In my opinion, multiple inheritance is not useful because it can get very confusing very quick. For polymorphism, C++ does early binding by default, while Java does late binding by default. Late binding is more useful than early binding.


Need of interface in java?

Interfaces are used in Java to accomplish most of the goals of Multiple Inheritance. For several reasons, Java only supports Single Inheritance for classes - i.e. a class can have only a single parent. The use of Interfaces is how Java attempts to implement most of the positives of the concept of Multiple Inheritance while avoiding its pitfalls.


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 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.


How do you implimenting multilevel inheritance in java?

In java we can implement more than one interfaces for a single class but we can't extend a class to more than one super class so ,java indirectly supports multiple inheritance.


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 { ... .... ...... }