Quantcast
Channel: equality
Viewing all articles
Browse latest Browse all 10

A Java “instanceof null” example

$
0
0

A Java “instanceof null” example

You might think that when the Java instanceof operator is used to test a null reference, such as a null reference to a String, instanceof would realize that even though the reference is currently null, it is a reference to a String, so you might expect instanceof to return true ... but it doesn't.


Viewing all articles
Browse latest Browse all 10

Trending Articles