Alpha a = x;
Foo f = (Delta)x;
Foo f = (Alpha)x;
Beta b = (Beta)(Alpha)x;
第1题:
A.Foo.beta()isavalidinvocationofbeta().
B.Foo.alpha()isavalidinvocationofalpha().
C.Methodbeta()candirectlycallmethodalpha().
D.Methodalpha()candirectlycallmethodbeta().
第2题:
A.int foo() { /* more code here */ }
B.void foo() { /* more code here */ }
C.public void foo() { /* more code here */ }
D.private void foo() { /* more code here */ }
E.protected void foo() { /* more code here */ }
第3题:
14 Alpha buys goods from Beta. At 30 June 2005 Beta’s account in Alpha’s records showed $5,700 owing to Beta.
Beta submitted a statement to Alpha as at the same date showing a balance due of $5,200.
Which of the following could account fully for the difference?
A Alpha has sent a cheque to Beta for $500 which has not yet been received by Beta.
B The credit side of Beta’s account in Alpha’s records has been undercast by $500.
C An invoice for $250 from Beta has been treated in Alpha’s records as if it had been a credit note.
D Beta has issued a credit note for $500 to Alpha which Alpha has not yet received.
第4题:
10. class Foo { 11. static void alpha() { /* more code here */ } 12. void beta() { /* more code here */ } 13. } Which two are true?()
第5题:
如果类Alpha继承了类Beta,则类Alpha称为派生类,类Beta称为【 】类。
第6题:
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;
第7题:
A.Alpha a = x;
B.Foo f = (Delta)x;
C.Foo f = (Alpha)x;
D.Beta b = (Beta)(Alpha)x;
第8题:
A.packagecom.;
B.importcom.x;
C.packagecom.x;
D.importcom.x.Alpha;
第9题:
现有如F包结构: com |一一X | |一一Alpha.class | | | |一一y I |一一Beta.class | |l-- Gamma.class 和类: class Test { Alpha a; Beta b; Gamma c; } 哪三个必须加入到类Test中,以使其通过编译?()
第10题:
现有包结构: com |-- x | |-- Alpha.class | | | |-- y | |-- Beta.class | |-- Gamma.class 和类: //insert code here import com.*; import com.x.y.*; class Test { Alpha a; Beta b; Gamma c; } 哪两行分别插入后可允许代码编译?()