Arithmetic operators perform the same basic operations you would expect if you used them in mathematics (with the exception of the percentage sign). They take two operands and return the result of the mathematical calculation.
Java has five arithmetic operators:
+ to add two numbers together or concatenate two Strings. - to subtract one number from another. * to multiply one number by another. / to divide one number by another. % to find the remainder from dividing one number by another.
int seven = 3 + 4; int four = 9 - 5; int thirtySix = 6 * 6; int five = 10 / 2; int one = 5 % 2;