Wiki Markup |
---|
Programmers frequently make errors regarding the precedence of operators because of the unintuitive low-precedence levels of {{&}}, {{\|}}, {{\^}}, {{<<}}, and {{>>}}. Avoid mistakes regarding precedence through the suitable use of parentheses. This also improves code readability, unless taken to excess. The precedence of operations by the order of the subclauses are defined in the Java Tutorials \[[Tutorials 2008|AA. Bibliography#Tutorials 08]\]. |
...
Wiki Markup |
---|
\[[ESA 2005|AA. Bibliography#ESA 05]\] Rule 65: Use parentheses to explicitly indicate the order of execution of numerical operators \[[Tutorials 2008|AA. Bibliography#Tutorials 08]\] [Expressions, Statements, and Blocks|http://java.sun.com/docs/books/tutorial/java/nutsandbolts/expressions.html], [Operators|http://java.sun.com/docs/books/tutorial/java/nutsandbolts/operators.html] |
...
NUM18EXP05-J. Be aware of numeric promotion behaviorUse braces for the body of an if, for, or while statement 02. Expressions (EXP) EXP07-J. Understand the differences between bitwise and logical operators