Home » Sometech » WAP in JAVA that implements the method of INTERFACE.

WAP in JAVA that implements the method of INTERFACE.

Java Coding

interface B1

{

void display1();

void display2();

}

interface B2

{

void studentdetails();

void employdetails();

}

interface B3

{

void mbadetails();

void mcadetails();

}

class abc implements B1,B2,B3

{

public void display1()

{

System.out.println(“display1”);

}

public void display2()

{

System.out.println(“display2”);

}

public void studentdetails()

{

System.out.println(“studentdetails”);

}

public void employdetails()

{

System.out.println(“employdetails”);

}

public void mbadetails()

{

System.out.println(“mbadetails”);

}

public void mcadetails()

{

System.out.println(“mcadetails”);

}

public static void main(String arg[])

{

abc x1= new abc();

x1.display1();

x1.display2();

x1.studentdetails();

x1.employdetails();

x1.mbadetails();

x1.mcadetails();

}

}

Advertisements

SoME Tech

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

%d bloggers like this: