TopPrimitive typesTesting for equality

Testing for equality

Primitive types differ from object types:

How do we determine if two values are the same?

For strings, be sure to only use ".equals" rather than "==" as it is possible to have different string representing the same sequence of characters.


TopPrimitive typesTesting for equality