It is easy to
test, but #2 is the correct answer...
try:
String ref = null;
if( ref instanceof Object )
System.out.println(true);
else
System.out.println(false);
nullref instanceof anything will always be false...
even nullref instance of nullRefType
String ref = null;
if( ref instanceof String )
System.out.println(true);
else
System.out.println(false);
}
also prints out false...
The tricky part of your question, however, is should
String ref = null;
be considered a "reference"?
[This message has been edited by Guy Reynolds (edited August 17, 2001).]