资源描述:
《北京神州数码思特奇信息技术股份有限公司》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、1:Whatiswrittentothestandardoutputgiventhefollowingstatement:System.out.println(4
2、7); Selecttherightanswer: A.4 B.5 C.6 D.7 2:Whatwillhappenwhenyouattempttocompileandrunthefollowingcode?publicclassStatic{static{intx=5;}staticintx,y;publicstaticvoidmain(Stringargs[]){x--;myMethod();Syst
3、em.out.println(x+y+++x);}publicstaticvoidmyMethod(){y=x+++++x;5.1-9,,services,andmakethecitymoreattractive,strengtheningpublictransportinvestment,establishedasthebackboneoftheurbanrailtransitmulti-level,multi-functionalpublictransportsystem,thusprotectingtheregionalpositionandachieve}}
4、Choices:A.prints:2 B.prints:3 C.prints:7 D.prints:8 3:WhichstatementsaboutJavacodesecurityarenottrue? A.Thebytecodeverifierloadsallclassesneededfortheexecutionofaprogram. B.Executingcodeisperformedbytheruntimeinterpreter. C.Atruntimethebytecodesareloaded,checkedandruninaninterpreter. D
5、.Theclassloaderaddssecuritybyseparatingthenamespacesfortheclassesofthelocalfilesystemfromthoseimportedfromnetworksources. 4:SelectvalididentifierofJava:A.%passwd B.3d_game C.$charge D.this 5:ThefollowingcodeisentirecontentsofafilecalledExample.java,causespreciselyoneerrorduringcompilat
6、ion:classSubClassextendsBaseClass{}classBaseClass(){Stringstr;publicBaseClass(){System.out.println(“ok”);}publicBaseClass(Strings){str=s;}}publicclassExample{publicvoidmethod(){SubClasss=newSubClass(“hello”);BaseClassb=newBaseClass(“world”);5.1-9,,services,andmakethecitymoreattractive,
7、strengtheningpublictransportinvestment,establishedasthebackboneoftheurbanrailtransitmulti-level,multi-functionalpublictransportsystem,thusprotectingtheregionalpositionandachieve}}Whichlinewouldbecausetheerror?A.9 B.10 C.11 D.12 6:Usetheoperator“>>”and“>>>”.Whichstatementistrue? A.10100
8、000000000000000000000000000>>4give00001010000000000000000000000000 B.10100000000000000000000000000000>>4give11111010000000000000000000000000 C.10100000000000000000000000000000>>>4give00000000000000000000000000000000 D.10100000000000000000000000000000>>>4give11111010000000000000000000