您所在位置: 网站首页 / java笔试题06.docx / 文档详情
java笔试题06.docx 立即下载
2025-08-25
约1.8万字
约25页
0
22KB
举报 版权申诉
预览加载中,请您耐心等待几秒...

java笔试题06.docx

java笔试题06.docx

预览

免费试读已结束,剩余 20 页请下载文档后查看

10 金币

下载文档

如果您无法下载资料,请参考说明:

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
查看更多
单篇购买
VIP会员(1亿+VIP文档免费下)

扫码即表示接受《下载须知》

java笔试题06

文档大小:22KB

限时特价:扫码查看

• 请登录后再进行扫码购买
• 使用微信/支付宝扫码注册及付费下载,详阅 用户协议 隐私政策
• 如已在其他页面进行付款,请刷新当前页面重试
• 付费购买成功后,此文档可永久免费下载
全场最划算
12个月
199.0
¥360.0
限时特惠
3个月
69.9
¥90.0
新人专享
1个月
19.9
¥30.0
24个月
398.0
¥720.0
6个月会员
139.9
¥180.0

6亿VIP文档任选,共次下载特权。

已优惠

微信/支付宝扫码完成支付,可开具发票

VIP尽享专属权益

VIP文档免费下载

赠送VIP文档免费下载次数

阅读免打扰

去除文档详情页间广告

专属身份标识

尊贵的VIP专属身份标识

高级客服

一对一高级客服服务

多端互通

电脑端/手机端权益通用