Hareendra Reddy wrote:Is there any conceptual reason behind why instanceof operator always return false when comapred with any class or interface type...?
From the
java language specification....
At run time, the result of the instanceof operator is true if the value of the RelationalExpression is not null and the reference could be cast (ยง15.16) to the ReferenceType without raising a ClassCastException. Otherwise the result is false.
So, in the case of comparing using null... I guess the short answer is, that is how it is defined.
Henry