0% found this document useful (0 votes)
9 views1 page

Java Interfaces and Class Implementation

The document defines two interfaces, Section and Branch, each with two methods. It also includes a class Cse that implements both interfaces, providing specific implementations for the methods. The main method creates an instance of Cse and calls the implemented methods to print details about the MAC Section and its members.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

Java Interfaces and Class Implementation

The document defines two interfaces, Section and Branch, each with two methods. It also includes a class Cse that implements both interfaces, providing specific implementations for the methods. The main method creates an instance of Cse and calls the implemented methods to print details about the MAC Section and its members.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

interface Section{

void print1();
void print2();
}
interface Branch{
void print3();
void print4();
}
class Cse implements Section,Branch{
public void print1(){
[Link]("MAC Section");}
public void print2(){
[Link]("Boys are 40 members");}
public void print3(){
[Link]("MAC Section");}
public void print4(){
[Link]("Girls are 21 members");}
}
class Multiple{
public static void main(String[]args){
Cse student=new Cse();
student.print1();
student.print2();
student.print3();
student.print4();
}
}

You might also like