answersLogoWhite

0

Actually, java does not support multiple inheritance. You can achieve partial multiple inheritance using interfaces but java is not like C or C++ where you can do direct multiple inheritance. However, you can achieve partial multiple inheritance with the help of interfaces.

Ex: public class FerrariF12011 extends Ferrari implements Car, Automobile {…}

And this is under the assumption that Car and Automobile are interfaces.

Here if you see, though you don't inherit concrete code from the Car or the Automobile interface, you do inherit skeleton methods that determine the way your class eventually behaves and hence this can be considered partial Multiple Inheritance.

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

Why JAVA cantt support multiple inheritence?

It's by design.


What is multiple inheritence in c?

C is not object oriented and therefore has no concept of inheritance of any kind.


What is an abstract interface?

An abstract interface is an interface which has a one-to-many relation - providing multiple paths from a single location to multiple locations.


Which interface is capable of sending multiple bits simultaneously?

A parallel interface is capable of sending multiple bits simultaneously.


What is an Interface of .Net can you please give an example?

An interface is not a class. It is an entity that is defined by the word Interface. An interface has no implementation; it only has the signature, just the definition of the methods without the declaration(body). As one of the similarities to Abstract class, it is a contract that is used to define hierarchies for all subclasses or it defines specific set of methods and their arguments. Since C# doesn't support multiple inheritance, interfaces are used to implement multiple inheritance.


Can interface extends another interface?

yes of cause interface is use in java at the place of multiple inheritance .o as like multiple inheritance u can extends interface class to other. and another think is interface contain abstract method i.e method with no defination so u can use it without any error.


What kind of interface is TouchFLO?

The TouchFLO has a graphical user interface which was created by HTC that is used on multiple HTC Smartphones. This graphical user interface provides many options and shows daily applications needed such as clocks, music player, messaging, and much more.


If your father-in-law leaves an inheritence to your husband are you intitled to some?

According to property laws, inheritence is considered separate property which is owned by the heir. A spouse is not entitled to inheritence.


What is full form mdi?

Multiple Document Interface.....................by shiv


What are the alternatives to inheritence in java?

Java does not support multiple inheritance; a subclass cannot have more than one parent. Java compensates for this with interfaces. A class can implement multiple interfaces, but can only extend one class.


Can multiple IP PBX share multiple call processors?

Multiple IP PBX can share multiple call processors with the use of standard interface.


What is a parallel peripheral device interface?

The interface between a computer and printer in which computer sends multiple bits signal to the printer.