Apex supports the standard set of operators found in most languages. Each operator is listed in Table 4.2 along with its valid data types, precedence if mathematical, and a brief description. In an expression with two operators, the operator with lower precedence is evaluated first.
Operators not included in Table 4.2 are the assignment variations of date, string, and numeric (
/=) and bitwise (
>>>=) arithmetic. For example,
x = x + 3 assigns
x to itself plus 3, but so does
x += 3.