MULTIPLE INHERITANCE USING EXTENDS AND INTERFACE IN JAVA
MULTIPLE INHERITANCE USING EXTENDS AND INTERFACE IN JAVA
interface A1
{
void print();
}
interface A2
{
void print2();
}
interface All extends A1, A2
{
void print3();
}
class demo implements All
{
public void print()
{
System.out.println("PRINT DONE");
}
public void print2()
{
System.out.println("PRINT DONE");
}
public void print3()
{
System.out.println("PRINT DONE");
}
public static void main(String args[])
{
demo obj=new demo();
obj.print();
obj.print2();
obj.print3();
}
}
Comments
Post a Comment