Priority of expressions and operators in Java Foundation

Time:2021-5-8
Precedence of expressions and operators

According to the number of operands, operators are divided into

Monocular operators + 5, – 6, + +, —

Binocular operator x + y

Trinary operator x? Y: Z

The type and value of the expression

Type of expression: the value data type of expression is the type of expression

Value of expression: the result of operation on the operands in the expression becomes the value of the expression

Priority of expressions and operators in Java Foundation

This work adoptsCC agreementReprint must indicate the author and the link of this article