Given below the sample code :
1 interface zoo {}
2 class A implements zoo {}
3 class B extends A{}
4 class D extends B{
5 public static void main( String[] args ) {
6 B x = new B();
7 // what code should be here
8 }
9 }
(2)
B(super class of D)cannot be cast to D(subclass of B).