public class InstanceTest
public static void main(String args)
D d = new D();
System.out.println(d instanceof AB); // returns false;
System.out.println(d instanceof C); // compilation error due to different types.
Question: Why for interface, compiler didn't throw error ? There is no relation between Class D and Interface AB.