已阅读5页,还剩2页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
选择题 1:Which of the following answer is correct to express the value 8 in octal number? A.010 B.0x10 C.08 D.0x8 2: 1. 1.publicclassX 2. 2.publicobjectm() 3. 3.objecto=newfloat(3.14F); 4. 4.objectoa=newobject1; 5. 5.oa0=o; 6. 6.o=null; 7. 7.oa0=null; 8. 8.returno; 9. 9. 10. 10. 11. Whenisthefloatobjectcreatedinline3,eligibleforgarbagecollection? 1. public class X 2. public object m () 3. object o = new float (3.14F); 4. object oa = new object 1; 5. oa0= o; 6. o = null; 7. oa0 = null; 8.return o; 9. 10. When is the float object created in line 3, eligible for garbage collection? A.Just after line 5 B.Just after line 6 C.Just after line 7 D.Just after line 8(that is, as the method returns) 3: 1. Whatwillbetheresultofexecutingthefollowingcode? 2. 3. publicstaticvoidmain(Stringargs) 4. 5. chardigit=a; 6. for(inti=0;i10;i+) 7. 8. switch(digit) 9. 10. casex: 11. 12. intj=0; 13. System.out.println(j); 14. 15. default: 16. 17. intj=100; 18. System.out.println(j); 19. 20. 21. 22. inti=j; 23. System.out.println(i); 24. 25. 26. Choices:What will be the result of executing the following code? public static void main(String args) char digit = a; for (int i = 0; i 4) 3. System.out.println(“Test1”); 4. elseif(x9) 5. System.out.println(“Test2”); 6. else 7. System.out.println(“Test3”); 8. Whichrangeofvaluexwouldproduceofoutput“Test2”?Give the code fragment:if(x4)System.out.println(“Test 1”);else if (x9)System.out.println(“Test 2”);else System.out.println(“Test 3”);Which range of value x would produce of output “Test 2”? A.x4 C.x9 D.None 13:A class design requires that a member variable should be accessible only by same package, which modifer word should be used? A.protected B.public C.no modifer D.private 14:Use the operator “” and “”. Which statement is true? A.1010 0000 0000 0000 0000 0000 0000 0000 4 give 0000 1010 0000 0000 0000 0000 0000 0000 B.1010 0000 0000 0000 0000 0000 0000 0000 4 give 1111 1010 0000 0000 0000 0000 0000 0000 C.1010 0000 0000 0000 0000 0000 0000 0000 4 give 0000 0000 0000 0000 0000 0000 0000 0000 D.1010 0000 0000 0000 0000 0000 0000 0000 4 give 1111 1010 0000 0000 0000 0000 0000 0000 15:Which of the following statements are not legal? A.long l = 4990; B.int i = 4L; C.double d = 34.4; D.double t = 0.9F. 简答题 16:比较两个字符串,用O(n)时间和恒量空间。 17:写一个方法(函数):判断一个单链表中是是否有环? 18:servlet的生命周期? 19:MVC的各个部分都有那些技术来实现?如何实现? 20:servlet的init()方法和service()方法的区别? 21:int 和 Integer 有什么区别? 22:数组aN,存放了1至N-1个数,其中某个数重复一次。写一个函数,找出被重复的数字.时间复杂度必须为o(N)函数原型:int do_dup(int a,int N) 23: 1. 找出以下程序错误。 2. ClassTest 3. privateStringpar1; 4. privateStringpar2; 5. Test() 6. 7. 8. publicstaticvoidmain(Stringarg) 9. inta; 10. if(a) 11. System.out.println(par1=+par1); 12. else 13. System.out.println(par2=+par2); 14. 15. 16. 找出以下程序错误。Class Test private String par1; private String par2; Test() public sta
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 社会工作实务操作流程解析
- 汽车行业供应链管理面试技巧分享
- 深入探讨网易的产品研发流程
- 糖尿病专科护士护理文书书写规范
- 网络运维专员运维外包管理方案
- 2025福建三明市工会社会工作者及专职集体协商指导员补充招聘21人笔试考试参考试题及答案解析
- 2025上海对外经贸大学后勤综合管理处行政管理人员招聘1人考试笔试模拟试题及答案解析
- 2025河北唐山中心医院心电图室急聘英才2人笔试考试备考题库及答案解析
- 2026上海国盛证券股份有限公司校园招聘41人笔试考试备考题库及答案解析
- 2026年广东机电职业技术学院单招职业适应性考试题库及答案详解一套
- 2025年考评员考试题及答案
- 安全监理工作总程序
- 2025年自动驾驶数据采集协议合同
- 2026年绿化植物冬季防寒合同
- 北京市昌平区2024-2025学年七年级上学期语文期末试卷(含答案)
- 2026年中国宏观经济展望分析报告:底部夯实亮点引领未来方向
- 新课标下的健美操大单元教学设计
- 2025至2030中国丁基橡胶行业项目调研及市场前景预测评估报告
- 竣工决算业务合同范本
- 企业员工管理与激励机制
- 生物质锅炉管理操作规程
评论
0/150
提交评论