上海国响信息技术有限公司_第1页
上海国响信息技术有限公司_第2页
上海国响信息技术有限公司_第3页
上海国响信息技术有限公司_第4页
上海国响信息技术有限公司_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

选择题1:1.whatistheresultwhenyoucompileandrunthefollowmode?2.3.publicclassTest.publicvoidmethod()1.for(inti=0;i3;I)5.system . out . print(I);16.17.执行以下操作18.19.system . out . print(I);20.21.执行以下操作22.23.执行以下操作24.25.Choices:what is the result when you compile and run the following code?Public class TestPublic void method()for(int I=0);I 3;I)system . out . print(I);system . out . print(I);秒ices :A.0122B.0123C.Compilation errorD.None of these23360关于垃圾回收的什么叙述是恰当的。A.程序开发人员需要为释放内存的操作创建自己的线程。B.垃圾回收确定并释放不再使用的内存。C.垃圾收集允许程序开发人员显式指定并立即释放内存。D.垃圾收集可以在任意时间释放Java对象占用的内存。在3:软件生命周期中,以下哪项描述不正确?A.软件生命周期分为规划、开发和执行三个阶段B.在计划阶段执行问题醛和需求分析C.在开发后期进行代码编写和软件测试D.操作阶段主要执行软件维护4:1.what will betheresultofexecutingthefollowmode?2.3./Filename;超级类x.java4.Ptectedvoidsuperclassmethodx()5.执行以下操作16.17.intsuperclassVarX18.19.执行以下操作3./FilenameSubclassY.java24.25.1 . packagepackagex . packagey;8.29.3 .publicclassubclassyextendssuperclass2.33.5。superclassxobjx=newsbclassy();34.35.6。subclassyobjy=newsbclassy();36.37.7.voidsubclassMethodY()0.41.9 . objy . superclassmethodx();42.43.10.inti44.45.11 . I=objy . super class varx;0.51.Choices:what will be the result of executing the following code?/Filename;超级类x.javaPackagepackagesPublic class SuperclassXProtected void superclassMethodX()Int superclassVarX/Filename SubclassY.java1.packagepackages.packagey2.3.public class sub class y extends super class x4.5.super classx objX=new SubclassY();6.子类y objy=new子类y();7.void subclassMethodY()8.9 . objy . superclassmethodx();10 . int I;11 . I=objy . super class varx;12.执行以下操作13.执行以下操作秒ices :A.Compilation error at line 5B.Compilation error at line 9C.Runtime exception at line 11D.None of these5:1.提供以下代码片段:即可从workspace页面中移除物件。即可从workspace页面中移除物件。以下哪个陈述是错误的?2.1) public voidcreate(),-3.2)vectormy vect;4.3)my vect=new vector();5.4)提供以下代码片段:即可从workspace页面中移除物件。即可从workspace页面中移除物件。以下哪个陈述是错误的?1) public voidcreate(),-2)Vector myVect;3)my vect=new Vector();4)A.第二行中的声明不会向myVect变量分配内存空间。B.第二个语句创建Vector类对象。C.第三个语句创建Vector类对象。D.第三行语句向Vector类对象分配内存空间6: which code fragments would correctly identify the number of arguments passed via command line to a Java application,exclude the name of the classa . int count=args . length;b . int count=args . length-1;c . int count=0;While(argscount)!=null)count;d . int count=0;While(!(args count。equals( )count;7: which is the main()method return of a application?A.StringB.byteC.charD.void8: use the operator“和”。which statement is true?a . 1010 0000000000000000000000000000000000000000000004 give 00000100000000000000000000000000000000000000000000000000000000000000000000000000000b . 1010 00000000000000000000000000000000000000 give 1111 1010 0000000000000000000000000000000000000000000000000000000000000000000000c . 1010 000000000000000000000000000000000004 give 0000000000000000000000000000000000000000000000000000000000000000000000000d . 1010 0000000000000000000000000000000000000000004 give 1111 1010 000000000000000000000000000000000000000000000000000000000000000009: a class design requirees that a member variable should be accessible only by same package,which modifer word should be used?A.protectedB.publicC.no修改器D.private10:1.publicclassouterclass2.privatedoubled1=1.03./insertcodeinhere4.5.youneedtoinsertaninnrclassdeclationatlanine 3。whichtwinnerclassdeclarationare6.valid?Public class outer classPrivate double D1=1.0/insert code hereyou need to insert an inner class declaration at line 3。which two inner class declarations areValid?A.class inner one public static double methoda() return D1;B.public class innerone static double methoda() return D1;C.private class innerone double methoda() return D1;D.static class innerone protected double methoda() return D1;11:1.public class x2.3.publicObjectm()4.5.objecto=new float(3.14 f);/line36.7.objectOA=new object1;/line48.9.OA0=o;/line510.11.o=null/line612.13.returnoa0;/line714.15.执行以下操作16.17.执行以下操作18.whenisthefloatobject、created inline3或eligibleforgarbagecollection?Public class XPublic objectm(),object o=new Float(3.14 f);/line 3Object OA=新建对象1;/line 4OA0=o;/line 5O=null/line 6return OA0;/line 7When is the float object,created in line 3,eligible for garbage collection?A.just after line 5 .B.just after line 6C.just after line 7 (that is,as the method returns)D.never in this method12: which statements about Java code security are not true?A.the byte code verifier loads all classes needed for the execution of a program。B.执行代码is performed by the runtime interpreter。C.at runtime the byte codes are loaded,checked and run in an interpreter。D.the class loader adds security by separating the namespaces for the classes of the local file system from those imported from network sources .使用13: JDBC可以A.将二进制代码发送到所有关系数据库B.将Java源代码发送到所有关系数据库C.将表单信息传递到所有关系数据库D.轻松地将SQL语句传递到所有关系数据库14:1.givethefollowwingcode :2.public class example3.pu

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论