Comparing Reference Variables

This code illustrates the two different ways of comparing reference variables:

And don't forget about the != operator. This checks if two variables do *not* have the same value. For reference variables, the != operator checks if the two variables do *not* point to the same object.