I'm checking one code with below exact same logic but not able to understand how its happening. So please bear with me..! :)
class A implements I{}
class B extends A{}
class C extends B{}
interface I{}
interface I2 extends I{}
interface I3 extends I2{}
class Top{
public static void main(String[] args){
I3 ob = new A(); //Step I
}
}
Its not possible at Step 1, but I'm reviewing one code where this kind of logic is happening without any error. May I know please if this is happening without error than what else could be looked to check its happening right ? What are the possibilities when Step 1 is right ?
Thanks