南宁java培训java基础(易唐).docx

南宁java培训java基础(易唐).docx

ID:62159351

大小:22.14 KB

页数:11页

时间:2021-04-19

南宁java培训java基础(易唐).docx_第1页
南宁java培训java基础(易唐).docx_第2页
南宁java培训java基础(易唐).docx_第3页
南宁java培训java基础(易唐).docx_第4页
南宁java培训java基础(易唐).docx_第5页
资源描述:

《南宁java培训java基础(易唐).docx》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、JAVASE部分1、Choosethethreevalididentifiersfromthoselistedbelow.(Choosethree)?A.IDoLikeTheLongNameClassB.$byteC.constD._okE.3_case2、Whichofthefollowinglinesofcodewillcompilewithouterror(Choosetwo)?A.inti=0;if(i){System.out.println(“Hi”);}B.booleanb=true;booleanb2=true;if

2、(b==b2){System.out.println(“Sotrue”);}C.inti=1;intj=2;if(i==1

3、

4、j==2)System.out.println(“OK”);D.inti=1;intj=2;if(i==1&

5、j==2)System.out.println(“OK”);3、Whichtwodemonstratea"hasa"relationship(Choosetwo)?A.publicinterfacePerson{}publicclassEmployeeextendsPerson{}B.publici

6、nterfaceShape{}publicinterfaceRectandleextendsShape{}C.publicinterfaceColorable{}publicclassShapeimplementsColorable{}D.publicclassSpecies{}publicclassAnimal{privateSpeciesspecies;}E.interfaceComponent{}classContainerimplementsComponent{privateComponent[]children;}4、W

7、hatwillhappenwhenyouattempttocompileandrunthefollowingcode?publicclassStatic{static{intx=5;}staticintx,y;publicstaticvoidmain(Stringargs[]){x--;myMethod();System.out.println(x+y+++x);}publicstaticvoidmyMethod(){y=x+++++x;}}A.compiletimeerrorB.prints:1C.prints:2D.print

8、s:3E.prints:7F.prints:85、Whatisthecorrectorderingfortheimport,classandpackagedeclarationswhenfoundinasinglefile?A.package,import,classB.class,import,packageC.import,package,classD.package,class,import6、Whatwillhappenwhenyouattempttocompileandrunthefollowingcode.public

9、classPvf{staticbooleanPaddy;publicstaticvoidmain(Stringargv[]){System.out.println(Paddy);}}A.CompiletimeerrorB.compilationandoutputoffalseC.compilationandoutputoftrueD.compilationandoutputofnull7、Giventhefolowingclasseswhichofthefollowingwillcompilewithouterror?interf

10、aceIFace{}classCFaceimplementsIFace{}classBase{}publicclassObRefextendsBase{publicstaticvoidmain(Stringargv[]){ObRefob=newObRef();Baseb=newBase();Objecto1=newObject();IFaceo2=newCFace();}}A.o1=o2;B.b=ob;C.ob=b;D.o1=b;8、下面那几个函数是publicvoidmethod(){...}的重载函数?A)publicvoid

11、method(intm){...}B)publicintmethod(){...}C)publicvoidmethod2(){...}D)publicintmethod(intm,floatf){...}9、给出如下声明:Strings=“Exam

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。