• Los operadores poseen un orden al ser evaluados en una expresión.
  • Se puede sobreescribir esta precedencia utilizando paréntesis.
  • En caso de que se tengan 2 o más operadores con el mismo nivel de precedencia; en la mayoría de los casos se evaluará de izquierda a derecha.
  • Los operadores de esta tabla van en orden decreciente
OperatorSymbols and ExampleEvaluation
Post-unary operatorsexpression++, expression--Left-to-right
Pre-unary operators++expression, --expressionLeft-to-right
Other unary operators-, !, ~, +, (type)Right-to-left
Cast(Type)referenceRight-to-left
Multiplication/division/modulus*, /, %Left-to-right
Addition/subtraction+, -Left-to-right
Shift operators<<, >>, >>>Left-to-right
Relational operators<, >, <=, >=, instanceofLeft-to-right
Equal to/not equal to==, !=Left-to-right
Logical AND&Left-to-right
Logical exclusive OR^Left-to-right
Logical inclusive OR|Left-to-right
Conditional AND&&Left-to-right
Conditional OR||Left-to-right
Ternary operatorsboolean expression ? expression : expression2Right-to-left
Assignment operators=, +=, -=, *=, /=, %=, &=, ^=, |, =, <<=, >>=, >>>=Right-to-left
Arrow operator->Right-to-left