" + " (Addition)

" – " (Subtraction)

" * " (Multiplication)

" / " (Division)

" %" (Modulus)

**Example:-**

public class math;

{

public static void main(string[] arg)

{

int x,y,answer;

x=60;

y=30;

answer=x+y; //(perform add operation)

answer=x-y; //(perform sub operation)

answer=x*y; //(perform mul operation)

answer=x/y; //(perform div operation)

answer=x%y; //(perform mod operation)

System.out.println(“Answer of addition =”+ answer);

}

}

ReplyDeletenice article for beginners.thank you.

javacodegeeks

welookups java