Numeric Operators
The following table describes numeric operators.
Operator | Description |
---|---|
^ (caret) |
Exponentiation. |
- (minus) or + (plus) |
Unary minus and plus. |
* (asterisk) or / (forward slash) |
Numeric multiplication or division. For division, the result is a Double. |
\ (backward slash) |
Integer division. The operands can be Integer or Long. |
Mod |
Modulus or Remainder. The operands can be Integer or Long. |
- (minus) or + (plus) |
Numeric addition and subtraction. You can also use the + (plus) operator for string concatenation. |