Jump to content

Talk:Java Programming/Arithmetic expressions

Page contents not supported in other languages.
Add topic
From Wikibooks, open books for an open world

In the expression: "10 + 50 - 5 + 7 % 2", "10 + 50" would be evaluated first, but the example shows 7 % 2 being evaluated first.

The expression contains four subexpressions with the same precedence: (10) + (50) - (5) + (7 % 2) which are evaluated left to right as the section says: "When there are multiple instances of the same precedence, Java reads from left to right."

Merge bitwise part with discussion on bits on types page

[edit source]

I think it would make more sense to take the bitwise operators part from this page and the discussion on computer memory representation from Primitive Types and combine them into a separate page. --BenTels (discusscontribs) 15:15, 2 June 2018 (UTC)Reply