Question 184 / 297:  considering AnyClassOrInterface is a class or an interface in java

what would the following statement print?

System.out.print(null instanceof AnyClassOrInterface );
                                
A  true
B  false
C  compilation error
D  NullPointerException is thrown at runtime
<< First < Previous Next > Last >>
Explanation:

null is not an instance of any type and this statement returns always false.

Exam Home Page
Ask
Copy and paste the following HTML code into your website or blog.
<iframe src="https://www.jobilize.com/embed/java-certification-questions" width="600" height="600" frameborder="0" marginwidth="0" marginheight="0" scrolling="yes" style="border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>