![]() ![]() For example, two string objects may be distinct objects (unequal in the first sense) but contain the same sequence of characters (equal in the second sense). The first type of equality usually implies the second (except for things like not a number ( NaN) which are unequal to themselves), but the converse is not necessarily true. A possible requirement would be that "A = B if and only if all operations on objects A and B will have the same result", in addition to reflexivity, symmetry, and transitivity. For example, 1/2 and 2/4 are considered equal when seen as a rational number.
0 Comments
Leave a Reply. |