
Write a Java program that demonstaress multiple inheritance.

Java does not support Multiple Inheritance but you can show it by implementing multiple interface.
interface IntefaceA {
void method1();
}
interface InterfaceB{
void method2();
}
interface Interface extends IntefaceA,InterfaceB {
void method3();
}
class InterfaceExample implements Interface {
public void method1() {
System.out.println("Method1.....");
}
public void method2() {
System.out.println("Method2.....");
}
public void method3() {
System.out.println("Method3.....");
}
public static void main(String arg[]) {
InterfaceExample ex = new InterfaceExample();
ex.method1();
ex.method2();
ex.method3();
}
}
For more information, visit the following link:
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.