![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Java follows standard practice with respect to the syntax rules that
dictate how the Java compiler crystallizes operands around operators. In
the following, for example, the Java compiler takes 6 + 3 * 2
to
be equivalent to 6 + (3 * 2)
, rather than to (6 + 3) * 2
,
because multiplication has precedence higher than addition:
6 + 3 * 2 // Equivalent to 12, rather than to 18