运算符优先级对照表

运算符优先级

快速索引: Java C++ C语言 PHP Python Java 运算符优先级 运算符 优先级 postfix expr ++ expr -- unary ++ expr -- expr + expr - expr ~ ! multiplicative * / % additive + - shift << >> >>> relational < > <= >= instanceof equality == != bitwise AND & bitwise exclusive OR ^ bitwise inclusive OR | logical AND && logical OR || ternary ? : assignment = += -= *= /= %= &= ^= |= <<= >>= >>>= C++运算符优先级 Precedence Operator Description Associativity 1 :: Scope resolution Left-to-right 2 ++ -- Suffix/postfix increment and decrement () Function call [] Array subscripting . Element selection by reference −> Element selection