




如果您无法下载资料,请参考说明:
1、部分资料下载需要金币,请确保您的账户上有足够的金币
2、已购买过的文档,再次下载不重复扣费
3、资料包下载后请先用软件解压,在使用对应软件打开
2022Java认证考试试题2022年Java认证考试试题运用Java语言的先进的面对对象特点,包括方法重载,方法覆盖,抽象类,接口,final,static和访问限制;实现文件的`输入输出(I/O)。下面是我整理的关于Java认证考试试题,希望大家仔细阅读!question1)whichofthefollowinglineswillcompilewithoutwarningorerror.1)floatf=1.3;2)charc='a';3)byteb=257;4)booleanb=null;5)inti=10;answertoquestion1question2)whatwillhappenifyoutrytocompileandrunthefollowingcodepublicclassmyclass{publicstaticvoidmain(stringarguments[]){amethod(arguments);}publicvoidamethod(string[]arguments){system.out.println(arguments);system.out.println(arguments[1]);}}1)errorcan´tmakestaticreferencetovoidamethod.2)errormethodmainnotcorrect3)errorarraymustincludeparameter4)amethodmustbedeclaredwithstringanswertoquestion2question3)whichofthefollowingwillcompilewithouterror1)importjava.awt.*;packagemypackage;classmyclass{}2)packagemypackage;importjava.awt.*;classmyclass{}3)/*thisisacomment*/packagemypackage;importjava.awt.*;classmyclass{}answertoquestion3question4)abytecanbeofwhatsize1)-128to1272)(-2power8)-1to2power83)-255to2564)dependsontheparticularimplementationofthejavavirtualmachineanswertoquestion4question5)whatwillbeprintedoutifthiscodeisrunwiththefollowingcommandline?javamyproggoodmorningpublicclassmyprog{publicstaticvoidmain(stringargv[]){system.out.println(argv[2])}}1)myprog2)good3)morning4)exceptionraised:'java.lang.arrayindexoutofboundsexception:2'answertoquestion5question6)whichofthefollowingarekeywordsorreservedwordsinjava?1)if2)then3)goto4)whilewhichofthefollowingstatementsaretrue?1)methodscannotbeoverridentobemoreprivate2)staticmethodscannotbeoverloaded3)privatemethodscannotbeoverloaded4)anoverloadedmethodcannotthrowexceptionsnotcheckedinthebaseclassanswertoquestion16question17)whatwillhappenifyouattempttocompileandrunthefollowingcode?classbase{}classsubextendsbase{}classsub2extendsbase{}publicclasscex{publicstaticvoidmain(stringargv[]){baseb=newbase();subs=(sub)b;}}1)compileandrunwithouterror2)compiletime

是你****噩呀
实名认证
内容提供者


最近下载