Equals() and hashCode() method in Java

Object Equality When it comes to Java ,there are two types of Object equality ,reference equality and object equality. Reference Equality Two references that refer to the same object on the heap are considered equal.If you want to check if two references are referring to the same object using the ‘==’ operator. The ‘==’ operator […]