If the promoted type of the operands is int or long, then an integer equality test is performed; if the promoted type is float or double, then a floating-point equality test is performed.
If the operands of an equality operator are both of type boolean, then the operation is boolean equality.
If the operands of an equality operator are both of reference type or the null type, then the operation is object equality.
If the operands of an equality operator are both of value type, then the operation is value equality.