Operator Precedence and Associativity

OperatorDescriptionAssociativity
()Parentheses (Grouping)
=Equal ToLeft-to-Right
<>Not Equal ToLeft-to-Right
>Greater ThanLeft-to-Right
<Less ThanLeft-to-Right
>=Greater Than Equal ToLeft-to-Right
<=Less Than Equal ToLeft-to-Right
^Exponent
%ModulusLeft-to-Right
/DivisionLeft-to-Right
*Multiplication
-SubtractionLeft-to-Right
+Addition
| ORBitwise OR
& ANDBitwise AND
=Assignment
Table of Contents
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.