Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

class inter {

interface myinterface3

void display();

}}

class inter1 implements inter.myinterface3{

public void display() {

System.out.println("it is implemented from interface1 from class inter");

interface myinterface4{

default void msg()

System.out.println("it is adefault method inside a class");

public class inter2 extends inter1{

public static void main(String [] args) {

inter1 obj1=new inter1();

//inter1.myinterface4 o=new inter1();

obj1.display();

obj1.msg();

You might also like