10.interfaceFoo{}11.classAlphaimplementsFoo{}12.classBe……
10.interfaceFoo{}11.classAlphaimplementsFoo{}12.classBetaextendsAlpha{}13.classDeltaextendsBeta{14.publicstaticvoidmain(String[]args){15.Betax=newBeta();16.//insertcodehere17.}18.}Whichcode,insertedatline16,willcauseajava.lang.ClassCastException?()
A.Alphaa=x;
B.Foof=(Delta)x;
C.Foof=(Alpha)x;
D.Betab=(Beta)(Alpha)x;
A.interfaceFoo{}11.classAlphaimplementsFoo{}12.classBetaextendsAlpha{}13.classDeltaextendsBeta{14.publicstaticvoidmain(String[]args){15.Betax=newBeta();16.//insertcodehere17.}18.}Whichcode,insertedatline16,willcauseajava.lang.ClassCastException?()
A.Alphaa=x;
B.Foof=(Delta)x;
C.Foof=(Alpha)x;
D.Betab=(Beta)(Alpha)x;