What is the default behavior of Equals Method?
- by Mostafa Mahdieh
Let A be a class with some members as x, y, z:
Class A {
int x;
int y;
String z;
...
}
A is an Object so it inherits the "Equals" functions defined in Object.
What is the default behavior of this function? Does it check for the equality of members or does it check for reference equality?