Multiple inheritance
interface A
{
void m1();
}
interface B
{
void m2();
}
interface C extends A,B
{
void m3();
}
class D implements C
{
public void m1()
{
System.out.println("Method
M1");
}
public void m2()
{
System.out.println("Method
M2");
}
public void m3()
{
System.out.println("Method
M3");
}
}
class InterDemo3
{
public static void main(String args[ ])
{
D ob=new D();
ob.m1();
ob.m2();
ob.m3();
}
}
Comments
Post a Comment