Multiple Inheritance with interfaces
Sun Mar 23 2025 09:58:28 GMT+0000 (Coordinated Universal Time)
Saved by
@Vyshnaviii
interface I1
{
void print( );
}
interface I2
{
void show( );
}
class A implements I1,I2
{
public void print( )
{
System.out.println("Hello");
}
public void show( )
{
System.out.println("Welcome");
}
}
class Demo12
{
public static void main(String args[ ])
{
A obj = new A( );
obj.print( );
obj.show( );
}
}
content_copyCOPY
Comments