2022Java认证考试试题2022年Java认证考试试题运用Java语言的先进的面对对象特点,包括方法重载,方法覆盖,抽象类,接口,final,static和访问限制;实现文件的`输入输出(I/O)
下面是我整理的关于Java认证考试试题,希望大家仔细阅读
question1)whichofthefollowinglineswillcompilewithout第1页共17页warningorerror
1)floatf=1
3;2)charc='a';3)byteb=257;4)booleanb=null;5)inti=10;answertoquestion1question2)whatwillhappenifyoutrytocompileandrunthe第2页共17页followingcodepublicclassmyclass{publicstaticvoidmain(stringarguments[]){amethod(arguments);}publicvoidamethod(string[]arguments){system
println(arguments);system
println(arguments[1]);}第3页共17页}1)errorcan´tmakestaticreferencetovoidamethod
2)errormethodmainnotcorrect3)errorarraymustincludeparameter4)amethodmustbedeclaredwithstringanswertoquestion2question3)whichofthefollowingwillcompilewithouterror第4页共17页1)importjava
*;packagemypackage;c