4
Conditional Statements
In Chapter 3, we learned about Java operators. We discussed two important properties of operators, namely, precedence and associativity. Precedence helps group shared operands. When precedence levels match, associativity is then used for grouping.
We discussed the unary operators – prefix and postfix increment/decrement, cast, and logical NOT. We also covered the binary operators – arithmetic, relational, logical, bitwise, and compound assignment. We learned about the behavior of the + symbol when one (or both) operands is a string. We discussed the logical AND (&&) and logical OR (||) and their short-circuiting property. Finally, the ternary operator, with its three operands, was covered.
We also learned about Java ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access