Difference Between Equality and Equivalence
what is the difference between Equality and Equivalence :
a variable can be equal when a value of variable are the same. example of equal variable but doesn’t equivalent :
int a = 3;
double b = 3.0;
variable a is equal to variable b, but the both variable are not equivalent, because each variable represent the different type.
variable a represent integer type, and variable b represent the double type.
example of equal variable and equivalent variable:
int a = 3;int b = 3;
variable a and variable b are equal and equivalent, because both variable has the same value and data type, integer type
equality or equal is about symbol = , equivalent is about symbol >, <
a = 3;
b = 3;
a = b (a is equal or equality with b)