Java Reference
InDepth Information
Chapter 2:
Operators and Expressions
Java is a very rich language in terms of operators it has. Java operators can be classified into
the following categories:
Arithmetic Operator
Relational operator
Logical operator
Assignment operator
Incrementdecrement operator
Conditional operator
Bitwise operator
Other special operators
Arithmetic operators
These operators are used in constructing mathematical expressions. Java provides all the
common arithmetic operators used algebra including +,,/,*,% . All these operators have the
same functionalities as in other languages.
Operator
Meaning
+
Unary plus or addition operator

Unary minus or subtraction operator
/
Division operator
*
Multiplication
%
Modulo Division (Remainder Operator)
Some example of arithmetic operators are as shown below:
P+q
Pq
p*q
p/q
p%q
p/q
In the above given examples, p and q are known as operands and these p and q can be vari
able or constants.
Integer arithmetic