




如果您无法下载资料,请参考说明:
1、部分资料下载需要金币,请确保您的账户上有足够的金币
2、已购买过的文档,再次下载不重复扣费
3、资料包下载后请先用软件解压,在使用对应软件打开
java笔试题06 第一篇:java笔试题06Usingthejava.lang.StringClass1.Giventhefollowing,1.publicclassStringRef{2.publicstaticvoidmain(String[]args){3.Strings1=“abc”;4.Strings2=“def”;5.Strings3=s2;6.s2=“ghi”;7.System.out.println(s1+s2+s3);8.}9.}whatistheresult?A.abcdefghiB.abcdefdefC.abcghidefD.abcghighiE.Compilationfails.F.Anexceptionisthrownatruntime.2.Giventhefollowing,11.Stringx=“xyz”;12.x.toUpperCase();13.Stringy=x.replace('Y','y');14.y=y+“abc”;15.System.out.println(y);whatistheresult?A.abcXyZB.abcxyzC.xyzabcD.XyZabcE.Compilationfails.F.Anexceptionisthrownatruntime.3.Giventhefollowing,13.Stringx=newString(“xyz”);生成两个字符串14.Stringy=“abc”;15.x=x+y;howmanyStringobjectshavebeencreated?A.2B.3C.4D.54.Giventhefollowing,14.Stringa=“newspaper”;15.a=a.substring(5,7);substring截字符串的,截取到end-1的位置16.charb=a.charAt(1);charAt他是截取单个字符,从0开始17.a=a+b;18.System.out.println(a);whatistheresult?A.apaB.appC.apeaD.apepE.pappF.papa5.Giventhefollowing,4.Stringd=“bookkeeper”;5.d.substring(1,7);6.d=“w”+d;7.d.append(“woo”);String类没有append()方法8.System.out.println(d);whatistheresult?A.wookkeewooB.wbookkeeperC.wbookkeewooD.wbookkeeperwooE.Compilationfails.F.Anexceptionisthrownatruntime.Usingthejava.lang.MathClass6.Giventhefollowing,1.publicclassExample{2.publicstaticvoidmain(String[]args){3.doublevalues[]={-2.3,-1.0,0.25,4};4.intcnt=0;5.for(intx=0;xMath.round(11.6)=12Math.round(-11.6)=-12Ceil:向上取整Math.ceil(x)>=Floor:向下取整Math.floor(x)应的角度6.System.out.println(Math.toRadians(Math.sin(75)));将参数的角度数转换成弧度7.}8.}atwhatlinewillthesineof75degreesbeoutput?A.Line3B.Line4C.Line5D.Line6E.Line3andeitherline4,5,or6F.NoneoftheaboveUsingWrapperClasses要使用1.4版本11.Giventhefollowing,1.publicclassWrapTest2{2.publicstaticvoidmain(String[]args){3.Longb=newLong(42);4.intx=Integer.valueOf(“345”);5.intx2=(int)Integer.parseInt(“345”,8);6.intx3=Integer.parseInt(42);7.intx4=Integer.parseInt(“42”);8.intx5=b.intValue();9.}10.}whichtwolineswillcausecompilererrors?(Choosetwo.)A.Line3B.Line4C.Line5D.Line6E.Line7F.Line812.Giventhefollowing,1.public

宛菡****魔王
实名认证
内容提供者


最近下载
贵州省城市管理行政执法条例.doc
贵州省城市管理行政执法条例.doc
一种基于双轨缆道的牵引式雷达波在线测流系统.pdf
一种基于双轨缆道的牵引式雷达波在线测流系统.pdf
一种胃肠道超声检查助显剂及其制备方法.pdf
201651206021+莫武林+浅析在互联网时代下酒店的营销策略——以湛江民大喜来登酒店为例.doc
201651206021+莫武林+浅析在互联网时代下酒店的营销策略——以湛江民大喜来登酒店为例.doc
用于空间热电转换的耐高温涡轮发电机转子及其装配方法.pdf
用于空间热电转换的耐高温涡轮发电机转子及其装配方法.pdf
用于空间热电转换的耐高温涡轮发电机转子及其装配方法.pdf