This code dose�nt compile. I thought that you could compare any reference variable but obviously not? Is the == operator working like instanceof wich only can compare instances of the same class hierarchy?
Joined: Mar 30, 2007
Yes, Using == operator we can compare instances of the same class.