Arithmetic operators are used in mathematical expressions.
The following table lists the arithmetic operators:
Operator Result
+ Addition
- Subtraction (unary minus)
* Multiplication
/ Division
% Modulus
++ Increment
+= Addition assignment
-= Subtraction assignment
*= Multiplication assignment
/= Division assignment
%= Modulus assignment
-- Decrement
The operands of the arithmetic operators must be of a numeric type. You cannot use arithmetic operators on boolean types, but you can use them on char types