Versions Compared

Key

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

...

Integer type ranges are defined by the JLS, §4.2.1, "Integral Types and Values", [JLS 2005] and are also described in rule "NUM00NUM16-J. Detect or prevent integer overflow."

The table below presents the rules for narrowing primitive conversions of integer types. In the table, for an integer type T, n represents the number of bits used to represent the resulting type T (precision).

...