




已阅读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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- ICU气管插管患者口腔护理规范与实践
- 古龙峡公司团建活动方案
- 吉利风暴促销活动方案
- 同在阳光下活动策划方案
- 同学郊游活动方案
- 名优老师活动方案
- 后勤行业整治活动方案
- 吴川户外团建活动方案
- 员工入股活动方案
- HR入职流程优化方案
- 2025年出版:全球市场工程机械多路换向阀总体规模、主要生产商、主要地区、产品和应用细分调研报告
- 电梯公告板制度
- 《2024 3610-T-339 可配置汽车信息娱乐服务 第 2 部分:要求》知识培训
- 2023年浙江省杭州市建德市国有粮食收储有限公司公开招聘工作人员8人笔试参考题库附带答案详解
- 科学上海会考试卷及答案
- 宠物清洁卫生用品猫砂
- 大模型备案-落实算法安全主体责任基本情况-XX集团有限公司
- 护理礼仪与人际沟通试题(含答案)
- 2025-2030中国蔬菜温室大棚市场消费趋势分析与经营管理风险报告
- 学校外来人员登记制度
- 应急物资中转站项目可行性研究报告(模板范文)
评论
0/150
提交评论