multiple inheritance using interface in java multiple inheritance using interface in java with example example for multiple inheritance using interface in java definition of multiple inheritance
Multiple inheritance is one in which their exists multiple base classes and single derived classes. Multiple inheritance using classes is not possible, but by using interfaces multiple inheritance can be achieved.
Multiple Inheritance is one of the Factor that makes Java is not 100% pure object oriented programming language.
Achieving the multiple inheritance in java by using Inheritance, makes java is not pure object oriented programming language. Because we cannot instantiate the object for the interface directly.
Click Here For Important Reasons Why Java is not 100% pure Object Programing Language ?
The following example illustrate the concept of Multiple inheritance by using interfaces
public void distance();
public void speed();
class vehicle implements car,bus
public void distance()
System.out.println(“distance travelled is”+distance);
public void speed()
public static void main(String args)
Vechicle v1=new Vehicle();