Whichstatements,wheninsertedattheindicatedpositioninthefollowingcode,willcausearuntimeexce

16 查阅

Whichstatements,wheninsertedattheindicatedpositioninthefollowingcode,willcausearuntimeexceptionwhenattemptingtoruntheprogram?()classA{}classBextendsA{}classCextendsA{}publicclassQ3ae4{publicstaticvoidmain(Stringargs[]){Ax=newA();By=newB();Cz=newC();//insertstatementhere}}

A.x=y;

B.z=x;

C.y=(B)x;

D.z=(C)y;

E.y=(A)y;

参考答案:

参考C

计算机考试