Java认证考试

interface Beta {}  class Alpha implements Beta {  String testIt() {  return “Tested”;  }  }  public class Main1 {  static Beta getIt() {  return new Alpha();  }  public static void main( String[] args ) {  Beta b = getIt();  System.out.println( b.testIt(

题目

interface Beta {}  class Alpha implements Beta {  String testIt() {  return “Tested”;  }  }  public class Main1 {  static Beta getIt() {  return new Alpha();  }  public static void main( String[] args ) {  Beta b = getIt();  System.out.println( b.testIt() );  }  }  What is the result?()  

  • A、 Tested
  • B、 Compilation fails.
  • C、 The code runs with no output.
  • D、 An exception is thrown at runtime.
如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

如果类Alpha继承了类Beta,则类Alpha称为派生类,类Beta称为【 】类。


正确答案:基
基 解析:在C++语言中,可以从一个类派生出另一个类。派生其他类的类称为基类(或父类),被派生的类称为派生类(或子类)。一个派生类可以从一个基类派生,也可以从多个基类派生。从一个基类派生的继承称为单继承,从多个基类派生的继承称为多继承。

第2题:

YouareaExamSheetInc.consultantwhousesa&ens

YouareaExamSheetInc.consultantwhousesaWindows2000Professionalportablecomputer.YourdomainuseraccountisamemberofthelocalAdministratorgroup.

Fromyourportablecomputer,youmapadrivetoasharedfoldernamedConsultMerticsona

computernamedServer1.YouconfigureConsultMerticstobeavailableoffline.Whenyoulogoftheportablecomputer,youreceivethefollowingerrormessage.

Youneedtosuccessfullysynchronizetheofflinefiles.Whatshouldyoudo?()


参考答案:D

第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.


正确答案:D

第4题:

Whichcommandshowsif an accesslistisassignedtoaninterface?()

A.show ip interface [interface] access-lists

B.show ip access-lists interface [interface]

C.show ip interface [interface]

D.show ip access-lists [interface]


参考答案:C

第5题:

设有一共用体变量定义如下: union data { long w; float x; int y; char z;}; union data beta; 执行下列语句后,正确的共用体变量beta的值是( )。 beta.w=123456; beta.y=888; beta.x=3.1416; beta.z='x';

A.123456

B.888

C.3.1416

D.'X'


正确答案:D
解析:因为共用体的所有成员共同占据一段存储空间,所以成员数据后赋的值会覆盖掉先赋的值,最后共用体变量中保留的就是最后一次赋的值。注意:共用体变量所占存储单元字节数的计算。

第6题:

简述Alpha测试与beta的区别。


正确答案:Alpha测试 在系统开发接近完成时对应用系统的测试;测试后仍然会有少量的设计变更。这种测试一般由最终用户或其它人员完成,不能由程序或测试员完成。 Beta测试 当开发和测试根本完成时所做的测试,最终的错误和问题需要在最终发行前找到。这种测试一般由最终用户或其它人员完成,不能由程序员或测试员完成。

第7题:

Alloftheclientcomputersinyourcompany’s&ens

Alloftheclientcomputersinyourcompany’snetworkareWindows2000portablecomputers.AusernamedMariastoresSalesfilesinherMyDocumentsfolder.Sheusesthesefileswhenshetravels.

Mariainformsyouthatwhenshetakesherportablecomputertotradeshows,shecanaccesssomeoftheSalesfilesbutnotallofthem.Whenherportablecomputerisconnectedtothenetworkattheoffice,shecanaccessallofthefiles.YouneedtoenableMariatoaccessallofthefilesinherMyDocumentsfolderwhensheisworkingremotely.

Whatshouldyoudo?()


参考答案:C

TogiveMariaaccesstothefileswhensheisworkingremotely,thefolderneedstobeenabledforofflineaccessandmustbeconfiguredtomaketheentirecontentsofthefolderavailableoffline.

第8题:

Youarecreatinganonlinecatalogapplicationthat&ens

YouarecreatinganonlinecatalogapplicationthatwilldisplayproductinformationonthecompanyWebsite.TheproductdataisstoredinaSQLServer2005database.ThedataisstoredasrelationaldatabutmustbepassedtotheapplicationasanXMLdocumentbyusingFORXML.YoutestyourapplicationandnoticethatnotalloftheitemsmatchingyourqueryappearintheXMLdocument.Onlythoseproductsthathavevaluesforallelementsintheschemaappear.

YouneedtomodifyyourTransact-SQLstatementsothatallproductsmatchingyourqueryappearintheXMLdocument.

Whatshouldyoudo?()


参考答案:B

第9题:

Which command shows if an access list is assigned to an interface?()

A. show ip interface [interface] access-lists

B. show ip access-lists interface [interface]

C. show ip interface [interface]

D. show ip access-lists [interface]


参考答案:C

第10题:

已知符号定义语句如下: ALPHA EQU 100 BETA EQU 25 GAMMA EQU 2 分别求下列各表达式的值。 (1)ALPHA*4GTBETA (2)ALPHAMODGAMMA+BETA (3)(BETA/3)LE5 (4)ALPHAANDBETA (5)GAMMAXOR(BETAEQ25)


正确答案: (1)ALPHA*4GTBETA=100*4GT25=0FFFFH
(2)ALPHAMODGAMMA+BETA=100MOD2+25=25
(3)(BETA/3)LE5=(25/3)LE5=0
(4)ALPHAANDBETA=100AND25=64H&19H=0
(5)GAMMAXOR(BETAEQ25)=2⊕(25EQ25)=0FFFDH

更多相关问题