Java结业测试题考试时间:180分钟姓名:________________选择题:(每题1分,共50分)1.Giventhefollowingcode:classTest{privateintm;publicstaticvoidfun(){//somecode...}}Howcanthemembervariablembeaccessibledirectlyinthemethodfun()?A.changeprivateintmtoprotectedintmB.changeprivateintmtopublicintmC.changeprivateintmtostaticintmD.changeprivateintmtointm2.Whichmethodsarecorrectoverloadingmethodsofthefollowingmethod:publicvoidexample(){...}A.publicvoidexample(intm){...}B.publicintexample(){...}C.publicvoidexample2(){...}D.publicintexample(intm,floatf){...}3.Giventhefollowingfragmentofcode:publicclassBase{intw,x,y,z;publicBase(inta,intb){x=a;y=b;}publicBase(inta,intb,intc,intd){//assignmentx=a,y=bw=d;z=c;}}Whichexpressionscanbeusedatthepointof//assignmentx=a,y=b?A.Base(a,b);B.x=a,y=b;C.x=a;y=b;D.this(a,b);4.Giventhefollowingdefinition:Strings="story";Whichofthefollowingexpressionsarelegal?A.s+="books";B.charc=s[1];C.intlen=s.length;D.Stringt=s.toLowerCase();5.Whatisthereturnvalueofthemain()methodinJava?A.StringB.intC.charD.void6.WhicharethevalididentifiersinJava?A.fieldnameB.superC.3numberD.#numberE.$number7.WhicharevalidJavakeywords?A.constB.NULLC.falseD.thisE.native8.WhicharevalidintegralexpressionsinJava?A.22B.0x22C.022D.22H9.Giventhefollowingfragmentofcode,whatareresultsofiandjafterexecution?inti=1;intj;j=i++;A.1,1B.1,2C.2,1D.2,210.Whichofthefollowingstatementsaretrue?A.>>isthearithmeticrightshiftoperator.B.>>isthelogicalrightshiftoperator.C.>>>isthearithmeticrightshiftoperator.D.>>>isthelogicalrightshiftoperator.11.Whichofthefollowingassignmentsarelegal?A.floata=2.0B.doubleb=2.0C.intc=2D.longd=212.Whichoneofthefollowingargumentsisthecorrectargumentofthemain()method?A.charargs[]B.charargs[][]C.Stringarg[]D.Stringargs13.Whichoneofthefollowingiscorrecttocreateanarray?A.floatf[][]=newfloat[6][6];B.float[]f[]=newfloat[6][6];C.floatf[][]=newfloat[][6];D.float[][]f=newfloat[6][6];E.float[][]f=newfloat[6][];14.Giventhefollowingexpression:intm[]={0,1,2,3,4,5,6};Whichresultofthefollow...