Henry Wong wrote:
vineet walia wrote:
why it is returning true.
in this obj is Object type. so obj reference type is object.if i will test this reference type with UsableVNO it should return false. but it is not returning
The instanceof operator is use to test whether an object is of a particular class type. It is *not* used to test whether the reference pointing to the object is a particular reference type... the later case can be done at compile time, and quite frankly, has very limited usefulness.