A very interesting thing I have pointed out here
output false.
This code is fine, it won't give any compilation error as both are Objects.
It gives output false as both objects are of different class.
Whereas when I
test manually (t==sb), it gives compilation error--incompatible type.
It seems that you can test the references of two object of different classes by equals but not by == operator.
Why the compiler is not compiling t==sb. If it gets compiled, it will surely run and give the same output false.
There is some flaw here.
Same thing you can test by equals but not by ==
Naseem
[ June 30, 2006: Message edited by: Naseem Khan ]