




已阅读5页,还剩3页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
杭州天丽科技有限公司 JAVA高级程序员选择题 1: 1. Whatwillbetheresultofexecutingthefollowingcode? 2. booleana=true; 3. booleanb=false; 4. booleanc=true; 5. if(a=true) 6. if(b=true) 7. if(c=true)System.out.println(Somethingsaretrueinthisworld); 8. elseSystem.out.println(Nothingistrueinthisworld!); 9. elseif(a&(b=c)System.out.println(Itstooconfusingtotellwhatistrueandwhatisfalse); 10. elseSystem.out.println(Heythiswontcompile); 11. 12. Choices:What will be the result of executing the following code? boolean a = true; boolean b = false; boolean c = true; if (a = true) if (b = true) if (c = true) System.out.println(Some things are true in this world); else System.out.println(Nothing is true in this world!); else if (a & (b = c) System.out.println(Its too confusing to tell what is true and what is false); else System.out.println(Hey this wont compile); Choices:A.The code wont compile B.Some things are true in this world will be printed C.Hey this wont compile will be printed D.None of these 2: Which of the following statements are true? A.The automatic garbage collection of the JVM prevents programs from ever running out of memory B.A program can suggest that garbage collection be performed and force it C.Garbage collection is platform independent D.An object becomes eligible for garbage collection when all references denoting it are set to null. 3: 1. Whatwillhappenwhenyouattempttocompileandrunthefollowingcode? 2. 3. classBase 4. 5. 6. 7. inti=99; 8. 9. publicvoidamethod() 10. 11. 12. 13. System.out.println(Base.amethod(); 14. 15. 16. 17. Base() 18. 19. 20. 21. amethod(); 22. 23. 24. 25. 26. 27. publicclassDerivedextendsBase 28. 29. 30. 31. inti=-1; 32. 33. 34. 35. publicstaticvoidmain(Stringargv) 36. 37. 38. 39. Baseb=newDerived(); 40. 41. System.out.println(b.i); 42. 43. b.amethod(); 44. 45. 46. 47. publicvoidamethod() 48. 49. 50. 51. System.out.println(Derived.amethod(); 52. 53. 54. 55. 56. 57. Choices:What will happen when you attempt to compile and run the following code? class Base int i = 99; public void amethod() System.out.println(Base.amethod(); Base() amethod(); public class Derived extends Baseint i = -1; public static void main(String argv) Base b = new Derived(); System.out.println(b.i); b.amethod(); public void amethod() System.out.println(Derived.amethod(); Choices:A.Derived.amethod() -1 Derived.amethod() B.Derived.amethod() 99 C.Compile time error D.Derived.amethod() 4: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 5:假定a和b为int型变量,则执行下述语句组后,b的值为 a=1; b=10; do b-=a; a+; while (b-0); A.9 B.-2 C.-1 D.8 6: 1. Whatresultsfromattemptingtocompileandrunthefollowingcode? 2. 3. publicclassTernary 4. 5. 6. 7. publicstaticvoidmain(Stringargs) 8. 9. 10. 11. inta=5; 12. 13. System.out.println(Valueis-+(a5)?9.9:9); 14. 15. 16. 17. 18. 19. Choices:What results from attempting to compile and run the following code? public class Ternarypublic static void main(String args)int a = 5;System.out.println(Value is - + (a 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 11: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 12:使用 JDBC 可以做到的是 A.把二进制代码传送到任何关系数据库中 B.把 Java 源代码传送到任何关系数据库中 C.把表单信息传送到任何关系数据库中 D.很容易地把 SQL 语句传送到任何关系数据库中 13:Math.round(-11.5)等於多少? A.-11 B.-12 C.-11.5 D.none 14:软件生命周期的瀑布模型把软件项目分为3个阶段、8个子阶段,以下哪一个是正常的开发顺序? A.计划阶段、开发阶段、运行阶段 B.设计阶段、开发阶段、编码阶段 C.设计阶段、编码阶段、维护阶段 D.计划阶段、编码阶段、测试阶段 简答题 15:找到一个子字符串,优化速度,优化空间。 16:什么是接口?为什么要定义接口?接口与抽象类有何异同? 17:下面的代码在绝大部分时间内都运行得很正常,请问在什么情况下会出现问题?问题的根源在哪里? import java.util.LinkedList; public class Stack LinkedList list = new LinkedList(); public synchronized void push(Object x) synchronized(list) list.addLast( x ); notify(); public synchronized Object pop() throws Exception synchronized(list) if( list.size() = 0 ) wait(); return list.removeLast(); 18:Java的接口和C+的虚类的相同和不同处。 19:hibernate中load()/get()区别。 20:How do
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 通信行业全新合同签订与通信服务质量管理制度
- 犯罪预防策略优化-洞察及研究
- 中储粮专业考试题及答案
- 电商专业面试题及答案
- 2025-2030钻井行业市场发展分析及趋势前景与投资战略研究报告
- 冠心病病人家庭的护理
- 2025至2030中国车载卸料器行业运营态势与投资前景调查研究报告
- 光伏材料制备技术
- 专题03 中国现代史·选择题(安徽专用)5年(2021-2025)中考1年模拟《历史》真题分类汇编
- 金融服务机构客户隐私保护与业务合作保密合同
- 骨折固定与康复技术新进展
- 2025-2030中国医院经营管理模式与创新发展规划研究报告
- 儿童过敏性鼻炎的护理措施
- 如何避免院内交叉感染
- 中粮品牌管理制度
- 肠造口护理质量敏感性指标体系构建研究
- 水洗砂劳务承包协议书
- 统编教材四年级上册语文1-8单元单元测试题含答案
- 赴乌克兰雇佣兵合同协议
- 苏科版四年级上册《劳动技术》全套教学课件
- 企业办公区休息区布置方案
评论
0/150
提交评论