In Mathematics, the Identity function clearly states that X = X for any X.
In Computers, this is not always the case. Items that look the same aren't necessarily equal to each other.
Javascript
PHP
X
Y
X == Y
abc
abc
Same
xyz
xyz
Same
Python
Java
C
Even though Java strings are immutable, you can still have two copies in memory. It does not guarantee
that all strings in memory are unique. By forcing a "new String()", we create a second instance
at a new memory location. Hence, xyz is duplicated in memory and fails the (pointer) equality test.