




已阅读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年食品安全员业务培训考试题库(答案+解析)
- 二手机械买卖合同标准版
- 2025年黑龙江省绥化市中考物理试卷(含答案)
- 广东省汕头市2024-2025学年高二下学期期末教学质量监测英语试卷(含答案)
- 第十三章 内能(新课预习 培优卷)(含答案)2025-2026学年人教版九年级全一册物理
- 高中物理学科教学装备配置方案
- 初中物理科学家传记与贡献解读
- 安全生产责任制(模板)
- 高二班主任心理健康指导计划
- 安全防护文明施工措施
评论
0/150
提交评论