Versions Compared

Key

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

...

As a general rule, use the Object.equals() method to check whether two objects are abstractly equal to each other and have equivalent contents and use the equality operators == and != to test whether two references specifically refer to the same object.  This latter test is referred to as referential equality. Also see MET09-J. Classes that define an equals() method must also define a hashCode() method .

...