Mastering Object Equality in Java
Introduction
The == operator is used to compare references, while the equals method is used to compare the contents of objects.
Comparison for predefined types
Primitive types
The comparison operator
blog.programwithjr.com6 min read