欢迎来到天天文库
浏览记录
ID:6380277
大小:666.73 KB
页数:56页
时间:2018-01-12
《java练习题1(有答案)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、第1题________isanobject-orientedprogramminglanguage.1、Java2、C++3、C4、Ada5、Pascal答案12第2题________isArchitecture-Neutral.1、Java2、C++3、C4、Ada5、Pascal答案1第3题________isatechnicaldefinitionofthelanguagethatincludesthesyntaxandsemanticsoftheJavaprogramminglanguage.1、Javalanguages
2、pecification2、JavaAPI3、JavaJDK4、JavaIDE答案1第4题________consistsofasetofseparateprogramsfordevelopingandtestingJavaprograms,eachofwhichisinvokedfromacommandline.1、Javalanguagespecification2、JavaAPI3、JavaJDK4、JavaIDE答案3第5题________providesanintegrateddevelopmentenvironment
3、(IDE)forrapidlydevelopingJavaprograms.Editing,compiling,building,debugging,andonlinehelpareintegratedinonegraphicaluserinterface.1、Javalanguagespecification2、JavaAPI3、JavaJDK4、JavaIDE答案4第6题Themainmethodheaderiswrittenas:1、publicstaticvoidmain(string[]args)2、publicstat
4、icvoidMain(String[]args)3、publicstaticvoidmain(String[]args)4、publicstaticmain(String[]args)5、publicvoidmain(String[]args)答案3第7题Whichofthefollowingstatementsiscorrect?1、Everylineinaprogrammustendwithasemicolon.2、Everystatementinaprogrammustendwithasemicolon.3、Everycom
5、mentlinemustendwithasemicolon;4、Everymethodmustendwithasemicolon;5、Everyclassmustendwithasemicolon;答案2第8题WhichofthefollowingstatementsiscorrecttodisplayWelcometoJavaontheconsole?1、System.out.println(WelcometoJava);2、System.out.println("WelcometoJava");3、System.println
6、(WelcometoJava);4、System.out.print(WelcometoJava);5、System.out.print("WelcometoJava");答案25第9题WhichJDKcommandiscorrecttorunaJavaapplicationinByteCode.class?1、javaByteCode2、javaByteCode.class3、javacByteCode.java4、javacByteCode5、JAVACByteCode答案1第10题SupposeyoudefineaJavac
7、lassasfollows:publicclassTest{}Inordertocompilethisprogram,thesourcecodeshouldbestoredinafilenamed1、Test.class2、Test.doc3、Test.txt4、Test.java5、Anynamewithextension.java答案4第11题TheextensionnameofaJavabytecodefileis1、.java2、.obj3、.class4、.exe答案3第12题Whichofthefollowinglin
8、esisnotaJavacomment?1、/**comments*/2、//comments3、--comments4、/*comments*/5、**comments**答案35第13题Whichofthefollowingaretherese
此文档下载收益归作者所有