Identity operators are used to checking whether both the variables are stored in the same memory locations.
If the values of the two variables are equal it doesn’t mean their memory locations are the same.
The two identity operators
is not are explained in the below table.
Identity and equal to (==) operators are similar but not the same.
|Comparison||is||TRUE||If both the operands are stored in the same memory locations|
|Comparison||is not||TRUE||If both the operands are stored in the different memory locations|