Code:
---------------------------------------------------
class AA {
}
class BB extends AA {
}
class Class24 {
public static void main(
String arg[]) {
AA a = null;
BB b = (BB) a;
System.out.println(b instanceof AA);
System.out.println(b instanceof BB);
}
}
--------------------------------------------------------------
Output: false,false
Query: Why the output is false for the above code. Please give explanation for that.