Sunday, October 4, 2020

write a java program demonstrating relationship between abstract class and interface

 interface In

{

public void ms();

}

interface In1 extends In

{

public void msg();

}

abstract class  A23 implements In1

{

public void msg1()

{

System.out.println("abstract class method");

}

}

class A21 extends A23

{

public void msg()

{

System.out.println("In1 interface is implemented");

}

public void ms()

{

System.out.println("In interface is implemented");

}

public static void main(String[] args) 

{

A21 a1=new A21();

a1.msg();

a1.msg1();

a1.ms();

}

};

No comments:

Post a Comment