Versions Compared

Key

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

...

This code uses == to compare two Integer objects. According to guideline EXP01-J. Do not compare String Avoid comparing objects using reference equality or relational operators, for == to return true for two object references, they must point to the same underlying object. Results of using the == operator in this case will be misleading.

...