Operators and Expressions
Java is a very rich language in terms of operators it has. Java operators can be classified into
the following categories:
Other special 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.
Unary plus or addition operator
Unary minus or subtraction operator
Modulo Division (Remainder Operator)
Some example of arithmetic operators are as shown below:
In the above given examples, p and q are known as operands and these p and q can be vari-
able or constants.