About Lesson
Arithmetic Operators
As the name saying they are used to perform arithmetic operations on two operands. Arithmetic operators can work on numeric data types like int, float and double. All the arithmetic operators are binary operators.
Operator Symbol |
Operation |
+ |
Addition |
– |
Subtraction |
* |
Multiplication |
/ |
Division |
% |
Modulus (Integer Operator) |
Order of Precedence for Arithmetic Operators:
- Brackets evaluates first. In case of nested brackets, inner one evaluates first then outer.
- Multiplication, division and modulus have next precedence. If all or some of them are there, then evaluation is left to right.
- Addition and subtraction have last precedence. If both exists, evaluation is left to right.