answersLogoWhite

0

Direct Multiple Inheritance in Object Oriented terms is the feature where one class extends/inherits the features of multiple classes.

ex: Assuming there is a class A which has method a() and class B which has method b() - Now if we need a class C that needs the features of both A and B it could be like:

public class C extends A, B {

...

}

This way it can use both the methods a() and b().

Unfortunately Java does not support direct multiple inheritance. You can achieve partial multiple inheritance using interfaces.

User Avatar

Wiki User

∙ 16y ago
User Avatar

What else can I help you with?

Related Questions

What is ambiguity in multiple inheritance?

Java does not support multiple inheritance


Different types of inheritances?

Single Inheritance Multiple Inheritance Multilevel Inheritance


What type of inheritance pattern are these rabbits likely displaying?

Types of dominance, multiple alleles, sex linked inheritance, polygenic inheritance and maternal inheritance.


What is the definition of a multiple allele trait in biology and how does it impact genetic inheritance?

A multiple allele trait in biology refers to a gene that has more than two possible alleles, or versions. This can result in a wider range of phenotypes, or physical characteristics, in individuals. In genetic inheritance, multiple allele traits can lead to more complex patterns of inheritance, as the presence of different alleles can interact in various ways to determine an individual's traits.


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


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


Drawbacks of multiple inheritance in c plus plus?

There are no drawbacks to multiple inheritance if multiple inheritance is precisely what is required to achieve your goal. If there are any drawbacks then it is only because of poor design, not multiple inheritance itself. For instance, when designing classes to simulate vehicles, an amphibious vehicle would inherit the properties of both an off-road vehicle and a marine vehicle, therefore multiple inheritance would be an appropriate usage.


What is the definition of coparcenary?

Partnership in inheritance; joint heirship; joint right of succession to an inheritance.


Why is multiple inheritance not possible in C?

C is not object-oriented -- you can't even use single inheritance let alone multiple inheritance.


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.


Which two terms best describe the inheritance of human blood types?

codominance and multiple alleles

Trending Questions
Why can't I load or save any minecraft files on my computer in the free minecraft classic single player now? Can your wages be garnished for child support if you didn't sign the birth certificate and never took a paternity test. Especially if the female was with more than one person when she got pregnant? How do you say have a good night everyone in French? What is the p on off button on my dash 2006 ford f350 powerstroke? Why for the same inventary level a revenue-sharing contract will result in a lower sales effort from the retailer than if the retailer has paid for product is responsible for all remaining Inventory? What causes your leg to ach? Can A Midsummer Night's Dream be set in space? How do you spell Badyrka in Ukrainian? Can you call anyone with face time (Using it on an iPad to call a cell phone number)? How is the process of calculating steady state in a system typically approached? What is IP datagram fragmentation and MTU? What is the sum of 12 and a number? How did Puritans were guard different ideas and cultures? What is a polyhedron in which one face can be any polygon and the lateral faces are triangles that meet at a common vertex? Under what circumstances can a person become dehydrated? What does it mean when an item condition is refurbished? What are the species of mushroom that are found in Nepal? Can you use the same function name for a member functoin of a class and an outside function in the same program file? What is white fuzzy mold that grows on strawberries when left in the fridge to long? Why is pony so excited about writing his English paper?