java单选题2018年版.docx
《java单选题2018年版.docx》由会员分享,可在线阅读,更多相关《java单选题2018年版.docx(35页珍藏版)》请在第一文库网上搜索。
1、1. Howmanybytesofstoragearerequiredforanintegeroftype1onginJava?(b)(a) Four(b) Eight(c) Two(d) Three注java中有8种基本类型byte:8位无符号整数Short:16位有符号整数臧廷杰int32位有符号整数IOng:64(8字节)位有符号整数f1oat:32位单精度浮点数doub1e:64位单精度浮点数Char:单个字符使用16位UniCOde编码boo1eanThetwoBoo1ean1itera1savai1ab1einJavaareand.(d)(a) T,F(b) O,1(c) TRUE
2、,FA1SE(d) true,fa1se3.Considerthefo11owing1ineofJavacode.(c)intx=1+7*2;Whatwi11betheva1ueofxattheendofexecutionofthe1ineofcode?J11x)zabedz(x/(x/(xr21161590)0Hgfrmany1inesofoutputwi11beproducedbythefo11owingcodefragment?(inti=O;i4;+i)for(intj=1;j3;+j)stdut.print1n(i+j);1171abed/(/(x/(/(101268Whichist
3、heJavakeywordusedtodenoteac1assmethod?(d)(a) c1ass(b) private(c) fina1(d) static6?AccordingtoJavadocconvention,thefirstsentenceofeachJavadoccommentshou1dbe(c)(a) an0authortag(b) theorderof1inesisnotimportant(c) asummarysentenceofthedec1aredentry(d) anversiontag7.Thecodingsystemusedtorepresentcharact
4、ersinJavais(c)(a)bytecode(b) ASCII(c) Unicode(d) EBCDIC8.Whichexpressionnc1usive)?Kx0IIx0x90=9x0&X9)eva1uatestotrueifandon1yifXisintherange0,9.Whichofthefo11owingisava1idintegerconstantdec1aration?(a)/V1JXv)z1JZabCd1f/(fina1intSCA1E=10;Jx)zJX)rabed1intfina1SCA1E=10;fina1SCA1E=10;intSCA1E=10;Whichoft
5、hefo11owingisava1idcharacter1itera1inJava?(注意字符与字符串的表示)(a)10.)zv)zv)zabCd/(/(zf/(Whichofthefo11owingisnotequiva1entinva1uetothefo11owingexpression?(b)f1ag=fa1sef1ag!=truef1ag!f1ag!(f1ag=true)臧廷杰12.v)xX1JZ1JabCdx/(/(xZ1xWhichofthefo11owingstatementsisusedtoexitfromaswitchstatemen(a)break;end;exit;def
6、au1t;Whichofthefo11owingisnota1ega1identifierinJava?(c)(a) first_index(b) Sfirstindex(c) !indexindex1InJava,whatistheidentifierfortheprimitivetypeusedtorepresentacharacter?(b)JZ111abCd/(x/(xft/(5.CharactercharcharacterCharWhichofthefo11owingisava1id1itera1oftypef1oatinJava?(c)(a) 10.5s(b)10.5fp(c)10
7、.5f(d)10.5d16.Whichofthefo11owingstatementsaboutconstructorsinJavaistrue?(a)(a)Ac1asscandefinemorethanoneconstructor.(b) Ac1assmustdefineat1eastoneconstructor.(c) Aconstructormustbedefinedaspub1ic.(d) Aconstructormustbedefinedasstatic.17.Accordingtothedocumententit1edCodeConventionsfortheJavaProgram
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- java 选题 2018 年版