- 1、本文档共35页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
(java单选题
1.?How many bytes of storage are required for an integer of type long in Java?????? (b)?(a) Four?(b) Eight?(c) Two?(d) Three?
注:java中有8种基本类型:byte:8位无符号整数 short: 16位有符号整数
int:32位有符号整数 long:64(8字节)位有符号整数 float:32位单精度浮点数
double:64位单精度浮点数 char:单个字符,使用16位Unicode编码 boolean2. ?The two Boolean literals available in Java are _____ and _____.????????? (d)?(a) T, F?(b) 0, 1?(c) TRUE, FALSE?(d) true, false? 3. ?Consider the following line of Java code.??????? (c)? int x = 1+7*2;? What will be the value of x at the end of execution of the line of code? ?(a) 21?(b) 16?(c) 15?(d) 9? 4. ?How many lines of output will be produced by the following code fragment????? (d)?for (int? i = 0; i 4; ++i)? {??? for (int? j = 1;? j 3 ; ++j)? {??????? stdOut.println(i + j);?(a) 10?(b) 12?(c) 6?(d) 8? ?? 5. ?Which is the Java keyword used to denote a class method??????? (d)?(a) class?(b) private?(c) final?(d) static? 6 ????According to Javadoc convention, the first sentence of each Javadoc comment should be????? (c)?(a) an @author tag?(b) the order of lines is not important?(c) a summary sentence of the declared entry?(d) an @version tag??
7. ?The coding system used to represent characters in Java is???? (c)?(a) bytecode?(b) ASCII?(c) Unicode?(d) EBCDIC? 8. ?Which expression below evaluates to true if and only if x is in the range [0, 9] (inclusive)???? (a)?(a) !(x 0 || x 9)?(b) 0 x 9?(c) 0 = x = 9?(d) x 0 x 9? 9. ?Which of the following is a valid integer constant declaration?????? (a)?(a) final int SCALE = 10;?(b) int final SCALE = 10;?(c) final SCALE = 10;?(d) int SCALE = 10;? 10. ?Which of the following is a valid character literal in Java??(注意字符与字符串的表示)??????? (a)?(a) ;?(b) ?(c) a?(d) = 1. ????Which of the following is not equivalent in value to the following expression????? (b)
flag == false?(a) flag != true?(b) flag?(c) !flag?(d) !(flag == true)? 12. ?Which of the following statements is u
文档评论(0)