
import java.io.*;
interface arith
{
int a=5;
int b=8;
void add();
void mul();
void sub();
void div();
}
class addition implements arith
{
public void add()
{
int c=a+b;
System.out.println("method add"+c);
}
}
class multiplication implements arith
{
public void mul()
{
int d=a*b;
System.out.println("method mul"+d);
}
}
class subtraction implements arith
{
public void sub()
{
int e=a-b;
System.out.println("method sub"+e);
}
}
class divide implements arith
{
public void div()
{
int f=a/b;
System.out.println("method div"+f);
}
}
class exampleinterface
{
public static void main(String []arg)
{
arith s=new addition();
multiplication t=new multiplication();
subtraction u=new subtraction();
divide v=new divide();
s.add();
t.mul();
u.sub();
}
}

Here is your code, we have modified it.
import java.io.*;
interface arith {
int a=5;
int b=8;
void add();
void mul();
void sub();
void div();
}
class exampleinterface implements arith{
public void add() {
int c=a+b;
System.out.println("method add: "+c);
}
public void mul() {
int d=a*b;
System.out.println("method mul: "+d);
}
public void sub() {
int e=a-b;
System.out.println("method sub: "+e);
}
public void div() {
int f=a/b;
System.out.println("method div: "+f);
}
public static void main(String []arg) {
exampleinterface s=new exampleinterface();
s.add();
s.mul();
s.sub();
s.div();
s.div();
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.