CSC300 / CSC402: Equals Operator and Equals Method [2/24] |
In Java, ==
checks object identity
on object types
Unlike other languages (such as C++) this behavior cannot be changed.
Objects all have an equals
method.
equals
varies from class to class.
==
The java.util.Objects class provides some handy
utilities, like Objects.equals
Navigate > GoTo
... There's a shortcut! On a Mac, you can use Cmd+RightClick
. On Linux or Windows, you can use Ctrl+RightClick
.