




如果您无法下载资料,请参考说明:
1、部分资料下载需要金币,请确保您的账户上有足够的金币
2、已购买过的文档,再次下载不重复扣费
3、资料包下载后请先用软件解压,在使用对应软件打开
JAVA程序员基本测试题目 第一篇:JAVA程序员基本测试题目PART1:Theessentialofjava1.Giventhefollowingcode,whattestwouldyouneedtoputinplaceofthecommentline?//placetestheretoresultinanoutputofthestringEqualpublicclassEqTest{publicstaticvoidmain(Stringargv[]){EqTeste=newEqTest();}EqTest(){Strings=“Java”;Strings2=“java”;//placetesthere{System.out.println(“Equal”);}else{System.out.println(“Notequal”);}}}A)if(s==s2)B)if(s.equals(s2)C)if(s.equalsIgnoreCase(s2))D)if(s.noCaseMatch(s2))2.GiventhefollowingcodehowcouldyouinvoketheBaseconstructorthatwillprintoutthestring“baseconstructor”;classBase{Base(inti){System.out.println(“baseconstructor”);}Base(){}}publicclassSupextendsBase{publicstaticvoidmain(Stringargv[]){Sups=newSup();//One}Sup(){//Two}publicvoidderived(){//Three}}A.OnthelineAfter//OneputBase(10);B.OnthelineAfter//Oneputsuper(10);C.OnthelineAfter//Twoputsuper(10);D.OnthelineAfter//Threeputsuper(10);3.Whatisthevalueofseasons.lengthforthefollowingarray?String[]seasons={“winter”,“spring”,“summer”,“fall”,};A.undefinedB.3C.4D.54.Whenyouusethenewkeywordtocreateanobject,whereisitcreated?A.HeapB.GarbagecollectorC.QueueD.Stack5.Whatwillhappenifyouattempttocompileandrunthefollowingcode?classBase{}classSubextendsBase{}classSub2extendsBase{}publicclassCEx{publicstaticvoidmain(Stringargv[]){Baseb=newBase();Subs=(Sub)b;}}A.CompileandrunwithouterrorB.CompiletimeExceptionC.RuntimeException6.Anoverriddenmethodcanbeinthesameclass.A.TrueB.False7.Giventhefollowingcodeimportjava.io.*;publicclassTh{publicstaticvoidmain(Stringargv[]){Tht=newTh();t.amethod();}publicvoidamethod(){try{ioCall();}catch(IOExceptionioe){}}}WhatcodewouldbemostlikelyforthebodyoftheioCallmethodA.publicvoidioCall(){DataInputStreamdin=newDataInputStream(System.in);din.readChar();}B.publicvoidioCall()throwIOException{DataInputStreamdin=newDataInputStream(System.in);din.readChar();}C.publicvoidioCall()throwsIOException{DataInputStreamdin=newDataInputStream(System.in);din.readChar();}D.publicvoidioCallthrowsIOException(){DataInputStreamdin=newData

猫巷****正德
实名认证
内容提供者


最近下载
贵州省城市管理行政执法条例.doc
贵州省城市管理行政执法条例.doc
一种基于双轨缆道的牵引式雷达波在线测流系统.pdf
一种基于双轨缆道的牵引式雷达波在线测流系统.pdf
一种胃肠道超声检查助显剂及其制备方法.pdf
201651206021+莫武林+浅析在互联网时代下酒店的营销策略——以湛江民大喜来登酒店为例.doc
201651206021+莫武林+浅析在互联网时代下酒店的营销策略——以湛江民大喜来登酒店为例.doc
用于空间热电转换的耐高温涡轮发电机转子及其装配方法.pdf
用于空间热电转换的耐高温涡轮发电机转子及其装配方法.pdf
用于空间热电转换的耐高温涡轮发电机转子及其装配方法.pdf