Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: rewrote code to clarify the need for null checks

...

This use of the equality operators also applies to numeric boxed types (for example,Byte, Character, Short, Integer, Long, Float, and Double), although the numeric relational operators (such as <, <=, >, and >=) produce results that match those provided for arguments of the equivalent primitive numeric types. See guideline EXP03-J. Avoid Do not use the equality operators when comparing values of boxed primitives for more information.

Noncompliant Code Example

...