// Program to explain Inheritance of a interface
// from another interface.interface AInterface
{
void showA();
}interface BInterface extends AInterface
{
void showB();
}class Test implements BInterface
{
public void showA()
{
System.out.println("showA() of A interface.");
}
public void showB()
{
System.out.println("showB() of B interface.");
}
}class InterfaceTest4
{
public static void main( String args[ ] )
{
AInterface a1 = new Test();
a1.showA();
BInterface b1 = new Test();
b1.showA();
b1.showB();
}
}
Output:showA() of A interface.
showA() of A interface.
showB() of B interface.