the unary type |
INCREMENT (++), DECREMENT (--), ADD TO (+), SUBTRACT FROM (-) |
These operators may be used to increment / decrement a variable's value, or to add / subtract other values to or from it. |
the bitwise type |
NOT (~), AND (&), OR (|), XOR (^), LEFT-SHIFT (<<), SIGNED RIGHT SHIFT (>>), UNSIGNED RIGHT SHIFT (>>>) |
The bitwise operators work with numbers on their basic binary levels. |
the Boolean type |
NOT (!), AND (&&), OR (||) |
The Boolean operators (also called logical) compare two conditions and based on the result direct the flow execution. |
the multiplicative type |
MULTIPLY (*), DIVIDE (/), MODULUS (%) |
Used to do multiplicative operations with two values. These operators are also called arithmetic operators. |
the additive type |
ADD (+), SUBTRACT (-) |
Used to do additive operations with two values. These operators are also called arithmetic operators. |
the relational type |
LESS-THAN (<), GREATER-THAN (>), LESS-THAN-OR-EQUAL-TO (<=), GREATER-THAN-OR-EQUAL-TO (>=) |
Used to do compare two values together and choose the further code flow. These operators are also called comparison operators. |
the equality type |
EQUAL (==), NOT EQUAL (!=), IDENTICALLY EQUAL (===), NOT IDENTICALLY EQUAL (!==) |
The equality operators check if two values are equal or not equal and choose the further code flow based on the result. These operators are also called comparison operators. |
the conditional type |
EXPRESSION (?), OPERANDS(:) |
These operators are also called ternary operators and they are used for quick comparisons between of two values and flow execution, all in one statement. |
the assignment type |
EQUALS TO (=), MULTIPLY / ASSIGN (*=), DIVIDE / ASSIGN (/=), MODULUS / ASSIGN (%=), ADD / ASSIGN (+=), SUBTRACT / ASSIGN (-=), LEFT SHIFT / ASSIGN (<<=), SIGNED RIGHT SHIFT / ASSIGN (>>=), UNSIGNED RIGHT SHIFT / ASSIGN (>>>=) |
The assignment operators are used to assign values to variables and, in combination with other operator types, as shorthand for compound assignments. |
the comma type |
COMMA (,) |
The comma operator allows the execution of more than one operation in a single statement. |
Comments
No comments have been made yet.
Please login to leave a comment. Login now