Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note that the explicit cast in the first conditional expression is redundant; that is, the value printed remains identical whether the cast is present or absent. Nevertheless, use of the redundant cast is good practice; it serves as an explicit indication of the programmer's intent and consequently improves maintainability. When the value of i in the second conditional expression falls outside the range that can be represented as a char, the explicit cast will truncate its value. This usage complies with exception EXP13-EX1 of guideline NUM00-J. Ensure conversions of numeric types to narrower types do not result in lost or misinterpreted data.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="37d7b2f3c06a30d9-57567f9f-4e7f42c2-90298c53-5ad0ce8bfd6a87b1b3960f51"><ac:plain-text-body><![CDATA[

[[Bloch 2005

AA. References#Bloch 05]]

Puzzle 8: Dos Equis

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="878099c740668833-8573360b-4e0d4629-9b75bcf1-37558287937e9a042b943904"><ac:plain-text-body><![CDATA[

[[Findbugs 2008

AA. References#Findbugs 08]]

"Bx: Primitive value is unboxed and coerced for ternary operator"

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="17e308e655e9df69-0b438a3a-47c34ccc-9d2b8d56-24b8eeb3e64ea5dff53f30a2"><ac:plain-text-body><![CDATA[

[[JLS 2005

AA. References#JLS 05]]

[§15.25, "Conditional Operator ? :"

http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.25]

]]></ac:plain-text-body></ac:structured-macro>

...