Can anyone explain the following behavior in Java using instanceof operator .
Runnable r = new Thread();
eventhough the type of variable r is Runnable and the instanceof comparison is done on classes that do not reside in the same class hierarchy
System.out.println(r instanceof String); // This line does not compile
System.out.println(r instanceof Vector); // This line compiles
System.out.println(r instanceof FileNotFoundException); // This line compiles